[mythtv] crash in PreviewGenerator in VideoBuffers::DeleteBuffers

Robert Tsai rtsai1111 at comcast.net
Tue Apr 4 03:20:59 UTC 2006


On Mon, Apr 03, 2006 at 10:30:27PM -0400, Robert Tsai wrote:
> On Mon, Apr 03, 2006 at 10:28:39PM -0400, Robert Tsai wrote:
> > The preview generator in the "Watch Recordings" screen doesn't
> > like my new recordings of FOX "Prison Break" and "24". However,
> > playing them back appears fine so far. I can test patches if
> > necessary.
> 
> If it matters, the recordings are apparently damaged enough for
> mythcommflag to complain about them (a bunch of "mpeg2video"
> logging), but playback in MythTV seems fine.
> 
> > [rtsai at myth:/media/myth/recordedtv]
> > (10:23pm) mythbackend --version
> > Library API version: 0.19.20060331-1
> > Source code version: 9619M
> > Options compiled in:
> >  linux debug using_oss using_alsa using_dvb using_x11 using_xv using_xrandr using_frontend using_backend
> > 
> > [rtsai at myth:/media/myth/recordedtv]
> > (10:27pm) mythfrontend --version
> > Library API version: 0.19.20060331-1
> > Source code version: 9619M
> > Options compiled in:
> >  linux debug using_oss using_alsa using_dvb using_x11 using_xv using_xrandr using_frontend using_backend
> > 
> > I don't think my local changes should have any effect on this:
> > 
> > 	http://svn.mythtv.org/trac/ticket/690
> > 
> > Here is the backtrace:
> > 
> > (gdb) bt
> > #0  0x00002b65f5a5913d in raise () from /lib/libc.so.6
> > #1  0x00002b65f5a5a86e in abort () from /lib/libc.so.6
> > #2  0x00002b65f5a8dc21 in __fsetlocking () from /lib/libc.so.6
> > #3  0x00002b65f5a9382e in malloc_trim () from /lib/libc.so.6
> > #4  0x00002b65f5a93b76 in free () from /lib/libc.so.6
> > #5  0x00002b65f2fa6559 in av_free (ptr=0x7a3c) at mem.c:132
> > #6  0x00002b65f26370e4 in VideoBuffers::DeleteBuffers (this=0x1e41ef8)
> >     at videobuffers.cpp:1216
> > #7  0x00002b65f2635e0a in VideoOutputNull::InputChanged (this=0x1e41e00,
> >     width=1280, height=720, aspect=1.77777779) at videoout_null.cpp:54
> > #8  0x00002b65f25a020c in NuppelVideoPlayer::ReinitVideo (this=0x1e7b890)
> >     at NuppelVideoPlayer.cpp:552
> > #9  0x00002b65f25a076d in NuppelVideoPlayer::SetVideoParams (this=0x1e7b890,
> >     width=1280, height=720, fps=59.940059661865234, keyframedistance=1,
> >     aspect=1.77777779, scan=kScan_Detect) at NuppelVideoPlayer.cpp:827
> > #10 0x00002b65f25d0671 in AvFormatDecoder::MpegPreProcessPkt (this=0x9f1410,
> >     stream=0x1e2f1a0, pkt=0x1db6e50) at avformatdecoder.cpp:1827
> > #11 0x00002b65f25d9746 in AvFormatDecoder::GetFrame (this=0x9f1410,
> >     onlyvideo=1) at avformatdecoder.cpp:2554
> > #12 0x00002b65f2591854 in NuppelVideoPlayer::GetFrameNormal (this=0x1e7b890,
> >     onlyvideo=1) at NuppelVideoPlayer.cpp:1149
> > #13 0x00002b65f25924ac in NuppelVideoPlayer::GetFrame (this=0x1e7b890,
> >     onlyvideo=1, unsafe=false) at NuppelVideoPlayer.cpp:1227
> > #14 0x00002b65f25a66ac in NuppelVideoPlayer::GetScreenGrab (this=0x1e7b890,
> >     secondsin=64, bufflen=@0x41093000, vw=@0x41093008, vh=@0x41093004,
> >     ar=@0x4109300c) at NuppelVideoPlayer.cpp:4735
> > #15 0x00002b65f24b24bc in PreviewGenerator::GetScreenGrab (pginfo=0x1dc7e68,
> >     filename=@0x1dc7ec8, secondsin=64, bufferlen=@0x41093000,
> >     video_width=@0x41093008, video_height=@0x41093004,
> >     video_aspect=@0x4109300c) at previewgenerator.cpp:391
> > #16 0x00002b65f24b2a3c in PreviewGenerator::LocalPreviewRun (this=0x1dc7e00)
> >     at previewgenerator.cpp:287
> > #17 0x00002b65f24b2e03 in PreviewGenerator::Run (this=0x1dc7e00)
> >     at previewgenerator.cpp:158
> > #18 0x00002b65f24b3080 in PreviewGenerator::PreviewRun (param=0x1dc7e00)
> >     at previewgenerator.cpp:175
> > #19 0x00002b65f547e12a in start_thread () from /lib/libpthread.so.0
> > #20 0x00002b65f5af13c3 in clone () from /lib/libc.so.6
> > 
> > (gdb) f 6
> > #6  0x00002b65f26370e4 in VideoBuffers::DeleteBuffers (this=0x1e41ef8)
> >     at videobuffers.cpp:1216
> > 1216            av_free(allocated_arrays[i]);
> > 
> > (gdb) l
> > 1211        for (uint i = 0; i < allocated_structs.size(); i++)
> > 1212            delete allocated_structs[i];
> > 1213        allocated_structs.clear();
> > 1214
> > 1215        for (uint i = 0; i < allocated_arrays.size(); i++)
> > 1216            av_free(allocated_arrays[i]);
> > 1217        allocated_arrays.clear();
> > 1218    #ifdef USING_XVMC
> > 1219        xvmc_surf_to_frame.clear();
> > 1220    #endif
> > 
> > (gdb) p i
> > $6 = 1
> > 
> > (gdb) p allocated_arrays[i]
> > $7 = (
> >     unsigned char *&) @0x1e30438: 0x2aaaae2df010 '\001' <repeats 200 times>...

I get a similar crash during commercial flagging:

#0  0x00002b5e35c6e13d in raise () from /lib/libc.so.6
#1  0x00002b5e35c6f86e in abort () from /lib/libc.so.6
#2  0x00002b5e35ca2c21 in __fsetlocking () from /lib/libc.so.6
#3  0x00002b5e35ca882e in malloc_trim () from /lib/libc.so.6
#4  0x00002b5e35ca8b76 in free () from /lib/libc.so.6
#5  0x00002b5e331bb559 in av_free (ptr=0x7c2c) at mem.c:132
#6  0x00002b5e3284c0e4 in VideoBuffers::DeleteBuffers (this=0x7adfe8) at videobuffers.cpp:1216
#7  0x00002b5e3284ae0a in VideoOutputNull::InputChanged (this=0x7adef0, width=1280, height=720, aspect=1.77777779) at videoout_null.cpp:54
#8  0x00002b5e327b520c in NuppelVideoPlayer::ReinitVideo (this=0x739960) at NuppelVideoPlayer.cpp:552
#9  0x00002b5e327b576d in NuppelVideoPlayer::SetVideoParams (this=0x739960, width=1280, height=720, fps=59.940059661865234, keyframedistance=1,
    aspect=1.77777779, scan=kScan_Detect) at NuppelVideoPlayer.cpp:827
#10 0x00002b5e327e5671 in AvFormatDecoder::MpegPreProcessPkt (this=0x85bc80, stream=0x7e36b0, pkt=0x7ba890) at avformatdecoder.cpp:1827
#11 0x00002b5e327ee746 in AvFormatDecoder::GetFrame (this=0x85bc80, onlyvideo=1) at avformatdecoder.cpp:2554
#12 0x00002b5e327a6854 in NuppelVideoPlayer::GetFrameNormal (this=0x739960, onlyvideo=1) at NuppelVideoPlayer.cpp:1149
#13 0x00002b5e327a74ac in NuppelVideoPlayer::GetFrame (this=0x739960, onlyvideo=1, unsafe=false) at NuppelVideoPlayer.cpp:1227
#14 0x00002b5e327bb6ac in NuppelVideoPlayer::GetScreenGrab (this=0x739960, secondsin=64, bufflen=@0x4600c8a0, vw=@0x4600c8a8, vh=@0x4600c8a4,
    ar=@0x4600c8ac) at NuppelVideoPlayer.cpp:4735
#15 0x00002b5e326c74bc in PreviewGenerator::GetScreenGrab (pginfo=0x7a06e8, filename=@0x7a0748, secondsin=64, bufferlen=@0x4600c8a0,
    video_width=@0x4600c8a8, video_height=@0x4600c8a4, video_aspect=@0x4600c8ac) at previewgenerator.cpp:391
#16 0x00002b5e326c7a3c in PreviewGenerator::LocalPreviewRun (this=0x7a0680) at previewgenerator.cpp:287
#17 0x00002b5e326c7e03 in PreviewGenerator::Run (this=0x7a0680) at previewgenerator.cpp:158
#18 0x00002b5e32587f49 in JobQueue::DoFlagCommercialsThread (this=0x718fd0) at jobqueue.cpp:2053
#19 0x00002b5e325883fb in JobQueue::FlagCommercialsThread (param=0x718fd0) at jobqueue.cpp:1909
#20 0x00002b5e3569312a in start_thread () from /lib/libpthread.so.0
#21 0x00002b5e35d063c3 in clone () from /lib/libc.so.6

(gdb) f 6
#6  0x00002b5e3284c0e4 in VideoBuffers::DeleteBuffers (this=0x7adfe8)
at videobuffers.cpp:1216
1216            av_free(allocated_arrays[i]);

(gdb) p i
$1 = 2

(gdb) p allocated_arrays.size()
$2 = 32

This is worse because it causes the entire backend to crash.

--Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060403/9e49f2b7/attachment.pgp 


More information about the mythtv-dev mailing list