[mythtv] Mythtranscode Segfaulting

Michael T. Dean mtdean at thirdcontact.com
Wed Apr 25 14:47:37 UTC 2007

On 04/25/2007 12:55 AM, Andy Speagle wrote:
> Ok...
> So.. let me take another crack at this... I've downgraded my QT to
> v3.3.4-r8on Gentoo... and my Mythtranscode is continuing to
> segfault... here's the
> latest gdb output:
> mythtv ~ # gdb mythtranscode -x gdbcommands
> (no debugging symbols found)
...  Really, a backtrace on a build compiled with debugging support is 
much more useful.  (And since you're using Gentoo, it should be easy to 
get one next time.) ...
> Program received signal SIGFPE, Arithmetic exception.
> [Switching to Thread -1258027312 (LWP 9518)]
> 0xb7afb42e in VideoOutput::ApplySnapToVideoRect () from 
> /usr/lib/libmythtv-
> 0.20.so.0

However, in this case, it's relatively clear what's likely happening 
even without specifics.  It looks like you're getting a division by zero 
(with "ydiff / display_video_rect.height()" and/or "xdiff / 
display_video_rect.width()").  While it would be possible to just check 
for zero (or add 1 to the width/height, as in the example patch below) 
to prevent the segfault, most of the code in VideoOutput relies on 
non-zero width and height, so you're likely to just get a segfault 
elsewhere if you don't fix the problem (i.e. figure out why 
display_video_rect isn't getting properly initialized).

I haven't looked to see how display_video_rect gets its values, but 
perhaps someone who knows VideoOutput/mythtranscode can chime in with 
reasons yours wouldn't have been initialized properly--giving it 0 for 
height or width.  Guessing... perhaps your transcoding profile is 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.patch
Url: http://mythtv.org/pipermail/mythtv-dev/attachments/20070425/20f1fba1/attachment.diff 

More information about the mythtv-dev mailing list