Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10668 closed Bug Report - Crash (fixed)

mythtranscode segfault [patch]

Reported by: adiemus <mythtv@…> Owned by: danielk
Priority: minor Milestone: 0.25.1
Component: MythTV - Recording Version: 0.25-fixes
Severity: medium Keywords: mythtranscode crash segfault
Cc: Ticket locked: no

Description

I recently upgraded my 0.21-fixed myth environment to 0.25-fixes. I'm chasing down several problems, once of which is that my newly transcoded content looks terrible (it's very blocky and seems to frequently corrupt a bit on scene changes) and that mythtranscode refuses to respect the sampling rate I set for audio transcode.

Anyway, in trying to troubleshoot these issues by running mythtranscode manually, I ran into an immediate and easily reproducible segfault. (Command, output and backtrace attached)

The source of the crash is ultimately at dtvrecorder.cpp:35 in the LOC preprocessor macro which dereferences tvrec without verifying that it's not NULL. (In the case of a transcode, it's explicitly NULL, leading to the crash in DTVRecorder::ResetForNewFile?())

I'm far too unfamiliar with myth's codebase to understand the proper way to fix the problem, but a simple workaround is to validate tvrec first, which seems to at least allow me to run mythtranscode manually so I can get about finding the source of my other issues.

Very simple patch attached. (Hopefully in a useful format)

Attachments (3)

mythtranscode-run.txt (1.1 KB) - added by adiemus <mythtv@…> 12 years ago.
manual command and output
mythtranscode-gdb.txt (1.2 KB) - added by adiemus <mythtv@…> 12 years ago.
gdb backtrace
mythtranscode.patch (560 bytes) - added by adiemus <mythtv@…> 12 years ago.
simple patch

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by adiemus <mythtv@…>

Attachment: mythtranscode-run.txt added

manual command and output

Changed 12 years ago by adiemus <mythtv@…>

Attachment: mythtranscode-gdb.txt added

gdb backtrace

Changed 12 years ago by adiemus <mythtv@…>

Attachment: mythtranscode.patch added

simple patch

comment:1 Changed 12 years ago by danielk

Component: MythTV - MythtranscodeMythTV - Recording
Milestone: unknown0.25.1
Owner: set to danielk
Status: newaccepted

comment:2 Changed 12 years ago by Daniel Thor Kristjansson <danielk@…>

Resolution: fixed
Status: acceptedclosed

In ac36239755c1eb4e241e801c4c3b30f2f41b123d/mythtv:

Fixes #10668. Fixes segfault in mythtranscode use of DTVRecorder.

This was discovered and diagnosed by Chris Tracy <mythtv@…>.

The problem is a debugging macro that assumes the recorder is being controlled by TVRec.

comment:3 Changed 12 years ago by Daniel Thor Kristjansson <danielk@…>

In d06433833bd0411cd3ff82e3810f006f4529da81/mythtv:

Fixes #10668. Fixes segfault in mythtranscode use of DTVRecorder.

This was discovered and diagnosed by Chris Tracy <mythtv@…>.

The problem is a debugging macro that assumes the recorder is being controlled by TVRec.

Note: See TracTickets for help on using tickets.