bugGnash - The GNU Flash player - Bugs: bug #18571, Segfault on exit with ffmpeg movie...

 
 

bug #18571: Segfault on exit with ffmpeg movie decoder

Submitted by:  Sandro Santilli <strk>
Submitted on:  Thu 21 Dec 2006 10:51:33 PM UTC  
 
Category: videoSeverity: 4 - Important
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Tomas Groth <tgc>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 15 May 2007 03:44:06 PM UTC, comment #12:

The avi doesnt' work either, but the FLV does, and I can't reproduce the segfault on exit.

Sandro Santilli <strk>
Project Member
Sat 12 May 2007 08:48:53 AM UTC, comment #11:

Hmm, this seems to be a wmv-specific bug since http://gnash.lulu.com/testvideos/scooter-avi.swf and http://gnash.lulu.com/testvideos/scooter-flv.swf works fine. I doubt thatthe unimplemented NetStream.bufferLength have something to do with this not working. I have a look at the bufferLength, but since playing wmv's isn't exactly standard flash behavior i'm not sure i'll use too much time on it before the release.

Tomas Groth <tgc>In charge of this item.
Sat 12 May 2007 07:34:00 AM UTC, comment #10:

MM... I can't reproduce the crash anymore, but neither I can see the video :(

Build options cvs20070512
Target:
Renderer: agg GUI: gtk Media handler: ffmpeg

The video is:

http://gnash.lulu.com/testvideos/scooter-wmv.swf

BTW, this might be easy to fix:

ERROR: Unimplemented: NetStream.bufferLength get

Sandro Santilli <strk>
Project Member
Tue 30 Jan 2007 01:04:04 PM UTC, comment #9:

I can still reproduce it. Seems a stack corruption.

#0 0x00000018 in ?? ()
(gdb) bt
#0 0x00000018 in ?? ()
#1 0xb74155c0 in gnash::render::videoFrameFormat () at /home/strk/src/gnash/gnash-head/server/render.cpp:100
#2 0xb7468fc9 in gnash::NetStreamFfmpeg::startPlayback (ns=0x81f2880) at /home/strk/src/gnash/gnash-head/server/asobj/NetStreamFfmpeg.cpp:355
#3 0xb746c865 in boost::_bi::list1<boost::_bi::value<gnash::NetStreamFfmpeg> >::operator()<void ()(gnash::NetStreamFfmpeg*), boost::_bi::list0> (
this=0x81f2b54, f=@0x81f2b50, a=@0xb5e543c2) at bind.hpp:229
#4 0xb746c8b5 in boost::_bi::bind_t<void, void ()(gnash::NetStreamFfmpeg), boost::_bi::list1<boost::_bi::value<gnash::NetStreamFfmpeg*> > >::operator() (
this=0x81f2b50) at bind_template.hpp:20
#5 0xb746c8df in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, void ()(gnash::NetStreamFfmpeg), boost::_bi::list1<boost::_bi::value<gnash::NetStreamFfmpeg*> > >, void>::invoke (function_obj_ptr={obj_ptr = 0x81f2b50, const_obj_ptr = 0x81f2b50, func_ptr = 0x81f2b50, data = "P"})
at function_template.hpp:136
#6 0xb6f3183d in boost::thread_group::create_thread () from /usr/lib/libboost_thread-gcc-mt-1_33_1.so.1.33.1
#7 0xb6f42341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xb6b2e4ee in clone () from /lib/tls/i686/cmov/libc.so.6

Sandro Santilli <strk>
Project Member
Tue 23 Jan 2007 04:43:11 PM UTC, comment #8:

I've just committed my patch, please test.

Tomas Groth <tgc>In charge of this item.
Sat 20 Jan 2007 01:01:04 AM UTC, comment #7:

I think i found a solution, at least gprocessor stopped crashing. It seems the problem was that the thread was started from a thread it self, or the problem at least was solved when it was started from the main thread. I'll commit ASAP, but it's tied to some video seeking code I've done which needs some more testing.

Tomas Groth <tgc>In charge of this item.
Fri 19 Jan 2007 03:15:43 PM UTC, comment #6:

Note that if you comment-out the pthread_join you still get a segfault somewhere else. It seems like NetStreamFfmpeg instance
is corrupted. Maybe add a testInvariant ?

Sandro Santilli <strk>
Project Member
Fri 19 Jan 2007 12:39:47 AM UTC, comment #5:

I switched from using pthreads to boost-threads, and get the exact same error. It seems like the thread (running NetStreamFfmpeg::av_streamer) is corrupt or something? It has been suggested that the problem might be that the annoying thread is started inside another thread which is soon after closed. But since the thread-reference is tied to the class I personally don't think this is the problem, but it's not like i got a lot of other ideas for what is wrong...

Tomas Groth <tgc>In charge of this item.
Thu 18 Jan 2007 11:49:49 PM UTC, comment #4:

Just tried with gprocessor, and it segfaults w/out need for any user intervention (easier to debug). Still on pthread_join.

#0 0xb721312c in pthread_join () from /lib/tls/i686/cmov/libpthread.so.0
#1 0xb79db364 in gnash::NetStreamFfmpeg::close (this=0x8080210) at /home/strk/src/gnash/gnash-head/server/asobj/NetStreamFfmpeg.cpp:102
#2 0xb79db5e6 in ~NetStreamFfmpeg (this=0x8080210) at /home/strk/src/gnash/gnash-head/server/asobj/NetStreamFfmpeg.cpp:69

Sandro Santilli <strk>
Project Member
Thu 18 Jan 2007 11:35:52 PM UTC, comment #3:

I can still reproduce. Used this as an example:
http://gnash.lulu.com/testvideos/scooter-wmv.swf

Sandro Santilli <strk>
Project Member
Thu 18 Jan 2007 11:56:04 AM UTC, comment #2:

I think i have fixed this now... I think/hope the issue was that I didn't stopped the thread properly (using pthread_exit), but that should have been fixed now. Feel free to test!

Tomas Groth <tgc>In charge of this item.
Mon 25 Dec 2006 06:39:52 PM UTC, comment #1:

Just to let you know, this also happens with gtk/opengl/sdl/ffmpeg.
Backtrace is the same.

Sandro Santilli <strk>
Project Member
Thu 21 Dec 2006 10:51:33 PM UTC, original submission:

When closing the Gnash window by any mean (^W, window-close or file->quit) a segmentation fault is triggered.

This has been verified to happen with both gtk/agg and gtk/opengl.
Also, verified that it does NOT happen with "mad" decoder.

Here's the backtrace:

#0 0xb6ab512c in pthread_join () from /lib/tls/i686/cmov/libpthread.so.0
#1 0xb72aa2be in gnash::NetStreamFfmpeg::close (this=0x81ebbc0)
at /home/strk/src/gnash/gnash-head/server/asobj/NetStreamFfmpeg.cpp:103
#2 0xb72aa568 in ~NetStreamFfmpeg (this=0x81ebbc0)
at /home/strk/src/gnash/gnash-head/server/asobj/NetStreamFfmpeg.cpp:70
#3 0xb72a9723 in ~NetStream (this=0x81ebbc0) at NetStream.h:66
#4 0xb72a9853 in ~netstream_as_object (this=0x81ebb98) at NetStream.h:85
#5 0xb76afac1 in gnash::ref_counted::drop_ref (this=0x81ebb98)
at ref_counted.h:68
#6 0xb7205c5a in gnash::as_value::drop_refs (this=0x81ec34c)
at /home/strk/src/gnash/gnash-head/server/as_value.cpp:575
#7 0xb71f5194 in ~as_value (this=0x81ec34c) at as_value.h:222
#8 0xb71fa2cd in ~SimpleProperty (this=0x81ec340) at Property.h:126
#9 0xb71f7890 in ~PropertyList (this=0x81d3128)
at /home/strk/src/gnash/gnash-head/server/PropertyList.cpp:229
#10 0xb72037e5 in ~as_object (this=0x81d3120)
at /home/strk/src/gnash/gnash-head/server/as_object.cpp:383
#11 0xb729df63 in ~Global (this=0x81d3120) at Global.h:38
#12 0xb76afac1 in gnash::ref_counted::drop_ref (this=0x81d3120)
at ref_counted.h:68
#13 0xb71fe6bd in gnash::intrusive_ptr_release<gnash::as_object> (o=0x81d3120)
at smart_ptr.h:54
#14 0xb71fe6ec in ~intrusive_ptr (this=0x81d20cc) at intrusive_ptr.hpp:83
#15 0xb7074f15 in ~VM (this=0x81d20c8)

Sandro Santilli <strk>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tgc (Updated the item)
  • -unavailable- added by strk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 May 2007 03:44:18 PM UTCstrkOpen/ClosedOpen=>Closed
    Tue 15 May 2007 03:44:06 PM UTCstrkStatusReady For Test=>Fixed
    Sat 12 May 2007 07:34:00 AM UTCstrkCategorysound-sdl=>video
    Tue 23 Jan 2007 04:43:11 PM UTCtgcStatusIn Progress=>Ready For Test
    Thu 18 Jan 2007 11:35:52 PM UTCstrkStatusReady For Test=>In Progress
    Thu 18 Jan 2007 11:56:04 AM UTCtgcStatusNone=>Ready For Test
    Thu 21 Dec 2006 11:39:56 PM UTCtgcSummarySegfault on exit with ffmpeg mp3 decoder=>Segfault on exit with ffmpeg movie decoder

    Back to the top


    Powered by Savane 3.1-cleanup1