crash inside decoder_SynchroNewPicture

This forum is about all development around libVLC.
XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

crash inside decoder_SynchroNewPicture

Postby XilasZ » 30 Aug 2009 22:34

Hi, i recently installed Windbg to get some info when libvlc cause my program to crash.

And sometimes, a crash occurs in decoder_SynchroNewPicture, which seems to be called by the mpeg2 decoder.
Here is the callstack from windbg, when using the latest 1.0.2 nightly build (debug) :

Code: Select all

RawArgs to Child 00000000 00000001 00000002 libvlccore!decoder_SynchroNewPicture+0x2b 05df5fe4 0dfdfe2c 000005d0 liblibmpeg2_plugin!vlc_entry__1_0_0e+0x1cc5 0cab39b0 00000014 00000001 libvlccore!input_DecoderDecode+0x1950 0cab39b0 0dfdff48 05e14bc8 libvlccore!input_DecoderDecode+0x14cf 05df5fe4 00000003 6a65a145 libvlccore!input_DecoderDecode+0x2008 0cb6ec88 0dfdff74 00000000 libvlccore!_vlc_thread_set_priority+0xd4 0cb752b0 0000000c 000005d0 libvlccore!vlc_threadvar_set+0x67 0ca3e150 0000000c 000005d0 msvcrt!endthreadex+0xa9 77c0a341 0ca3e150 00000000 KERNEL32!GetModuleFileNameA+0x1ba
It happens randomly when changing stream (stop the current one, start another).
It seems the decoder is still trying to work between the streams, and call decoder_SynchroNewPicture with a null pointer.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: crash inside decoder_SynchroNewPicture

Postby Jean-Baptiste Kempf » 30 Aug 2009 23:57

try to run VLC with --codec avcodec
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: crash inside decoder_SynchroNewPicture

Postby XilasZ » 31 Aug 2009 00:23

i tried it with vlc, it changes the codec used, and maybe is a good workaround for the issue, but it also add a worse one :
i don't have any sound with an h264+mpeg4audio stream (and maybe other type of streams too) !!!!!!!!!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: crash inside decoder_SynchroNewPicture

Postby Jean-Baptiste Kempf » 31 Aug 2009 17:13

Try --codec faad,avcodec :D
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: crash inside decoder_SynchroNewPicture

Postby XilasZ » 31 Aug 2009 20:52

cheater :lol:
Sound is working for h264+mpeg4audio streams.

But it's still a workaround. Maybe other kind of streams won't work.
And that doesn't solve the mpeg2 bug (a simple "if (!p_synchro) return;" may fix it), or the missing sound bug somewhere in avcodec :P

Edit: so far, no more crash, i'll keep testing.

But i found another weird bug: when recording and displaying an h264+mpeg4audio stream (so using sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst="test.ts"}}), vlc displays the stream, but the width is almost doubled (libvlc reports a size of 3811x1080, but the stream is 1440x1080 with a 16/9 ratio, so it should report 1920x1080). It happens with vlc too, and no need to record the stream.
Adding "sout=#display" shouldn't have any effect, but the width is doubled :mrgreen:

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: crash inside decoder_SynchroNewPicture

Postby Jean-Baptiste Kempf » 01 Sep 2009 00:02

Other solution is to remove the libmpeg2 plugin.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: crash inside decoder_SynchroNewPicture

Postby XilasZ » 01 Sep 2009 07:51

Other solution is to remove the libmpeg2 plugin.
It's still a workaround (even if it's working).


What about this :
But i found another weird bug: when recording and displaying an h264+mpeg4audio stream (so using sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst="test.ts"}}), vlc displays the stream, but the width is almost doubled (libvlc reports a size of 3811x1080, but the stream is 1440x1080 with a 16/9 ratio, so it should report 1920x1080). It happens with vlc too, and no need to record the stream.
Adding "sout=#display" shouldn't have any effect, but the width is doubled :mrgreen:

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: crash inside decoder_SynchroNewPicture

Postby Jean-Baptiste Kempf » 01 Sep 2009 10:27

What about this :
But i found another weird bug: when recording and displaying an h264+mpeg4audio stream (so using sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst="test.ts"}}), vlc displays the stream, but the width is almost doubled (libvlc reports a size of 3811x1080, but the stream is 1440x1080 with a 16/9 ratio, so it should report 1920x1080). It happens with vlc too, and no need to record the stream.
Adding "sout=#display" shouldn't have any effect, but the width is doubled :mrgreen:
Sorry, no idea..
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: crash inside decoder_SynchroNewPicture

Postby XilasZ » 02 Sep 2009 12:12

Thanks anyway, with the --codec workaround, and the few bug i fixed, my program doesn't crash anymore (yet :p).

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: crash inside decoder_SynchroNewPicture

Postby Jean-Baptiste Kempf » 02 Sep 2009 12:23

Does VLC crash on such streams?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: crash inside decoder_SynchroNewPicture

Postby XilasZ » 02 Sep 2009 15:33

I have no idea if vlc can crash because of decoder_SynchroNewPicture. I guess it could.
To force the crash to happens, i modified my program to switch stream each 3 or 4 second, but i can't do that with vlc :p

the width issue happens with both libvlc and vlc, but no crash.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 61 guests