bill-auger / av-caster

A light-weight native gStreamer GUI for screencast, webcam, and audio recording and streaming
Other
87 stars 15 forks source link

Crash in libgstcompositor.so on startup with gStreamer v1.8.0 #47

Open bjorn opened 8 years ago

bjorn commented 8 years ago

I'm getting the following crash on startup. Unfortunately, it appears to originate from a dependency of av-caster, so a debug build had no additional information:

[STATE]:   set 'pipeline' to state GST_STATE_PLAYING
[STATE]:   gStreamer ready
[STATE]:   chat disabled
[STATE]:   finalizing initialization
[CONFIG]:  storing preset[2] 'livecoding.tv'
[STATE]:   showing Background GUI
[CONFIG]:  started listening for model changes
[STATE]:   AvCaster ready
[New Thread 0x7fffa9ffb700 (LWP 7639)]
[New Thread 0x7fffa97fa700 (LWP 7640)]

Thread 11 "compositor:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcaffd700 (LWP 7630)]
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff124de00 in ?? () from /usr/lib/gstreamer-1.0/libgstcompositor.so
#2  0x00007ffff1040075 in ?? () from /usr/lib/libgstbadvideo-1.0.so.0
#3  0x00007ffff0e2fe73 in ?? () from /usr/lib/libgstbadbase-1.0.so.0
#4  0x00007ffff6b0fd81 in ?? () from /usr/lib/libgstreamer-1.0.so.0
#5  0x00007ffff657e30e in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007ffff657d975 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff6fa8424 in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007ffff54cdcbd in clone () from /usr/lib/libc.so.6
(gdb) 

I have gst-plugins-bad 1.8.0-2 installed.

bill-auger commented 8 years ago

yes this looks like a known issue that i have seen to be intermittent approx 1 in 10 starts - i have spoken with the gStreamer devs about this and i need to thoroughly exercise it in valgrind to try to pinpoint the bug - does this happen every time for you or is it intermittent?

bjorn commented 8 years ago

This happened every time for me, with both building from AUR and compiling myself. I tried it about 4-5 times.

bill-auger commented 8 years ago

the first thing i would try is launching with some of the media disabling switches you can get from av-caster --help - in your case specifically av-caster --screen-only and av-caster --camera-only may get you running - o/c this limits some of the functionality

also you could try building a previous version of avcaster like at tags v0.15.201 or av-caster-0.16-pre https://github.com/bill-auger/av-caster/releases

i have been developing against gstreamer 1.6.3 on debian testing so you could try using that version - i was actually developing on arch for a while but i have since clobbered that install - i think this was back at tag av-caster-0.15 - if you can not get any of these running with the latest gstreamer i guess i will need to reinstall arch again to do some troubleshooting

bjorn commented 8 years ago

Ah, I forgot to mention that because of not being able to compile master I had already checked out the v0.15.203 tag, so this bug report is against that version.

With --screen-only I get:

[ERROR]:   Error creating OutputBin GstElements.

With --camera-only I get:

[ERROR]:   error linking elements 'camera-bin' and 'muxer-bin'
[ERROR]:   Error creating OutputBin GstElements.
[ERROR]:   Error linking CompositorBin to other bins.

In both cases, it at least avoids the segmentation fault.

It doesn't really make sense for me personally to try older releases. I can keep using OBS until these issues are fixed. I'd only do it if it would possibly help you find out what's going wrong.

bill-auger commented 8 years ago

sure i appreciate that - i am most interested in why could you not compile the master branch ? it doesnt do much good to track down bugs in older versions - the reason i mentioned older versions is because i was developing on arch for a while and it was working well and i was aiming to determine if your problem was hardware related or if there was some regression introduced since

do you have a camera plugged in ?

do these command work correctly for you ?

gst-launch-1.0 videotestsrc ! ximagesink
gst-launch-1.0 videotestsrc ! xvimagesink
av-caster --no-preview

if yes - could you post the entire trace with --screen-only

bjorn commented 8 years ago

I think I couldn't compile master because of #48, so I didn't open an issue about this. But I will try it again and post the exact errors I'm getting. I'll also do those tests and let you know the result.

bill-auger commented 8 years ago

i confirmed this over the weekend on arch using gStreamer v1.8.0 - v1.8.0 has since been added to debian and behaves the same as soon as i upgraded - for now you can probably get av-caster running on arch by downgrading gStreamer to v1.6.3

the bug is now reproducible 100% of the time so i have submitted a proper bug report https://bugzilla.gnome.org/show_bug.cgi?id=765324

NOTE: on my box the crash can be averted by passing the following switch which excludes the compositor from the pipeline:

$ build/av-caster-dbg --screen-only
bjorn commented 8 years ago

Arg, of course I totally forgot about running those tests, sorry! I assume you don't need that information now anymore.

I did have a camera plugged in.

bill-auger commented 8 years ago

nope s'all good - as i suspected this was not specific to arch - it is something about gStreamer v1.8.0 - it is just that arch upgraded to v1.8.0 before debian testing so you saw it first

anyways i isolated the bug and the gStreamer devs crafted a patch that may be included as soon as v1.8.2 - i also put a temporary fix in av-caster to avoid it on the development branch - i should have the master branch up to snuff again soon