GNOME Bugzilla – Bug 743909
videobox, videocrop: crash with bottom=-214748364
Last modified: 2018-05-06 12:16:41 UTC
When the top/left/right/bottom values are anything more than video width/height, then the pipeline crashes. Sample pipeline is as follows. gst-launch-1.0 videotestsrc num-buffers=20 ! videobox bottom=-214748364 ! videoconvert ! autovideosink The values should be handled properly as per video height/width
Doesn't crash for me, but errors out with not-negotiated flow, as expected, or a bufferpool configuration error. Could you provide a stack trace of the crash please?
Hi Tim, I was able to reproduce the issue with specific values of the parameters. When i give very high values it gives bufferpool configuration error, after some recent changes in bufferpool i guess. But when give in specific range it crashes with SIGSEGV. This is the parameters i used Starting program: /home/vineeth/gst/master/gstreamer/tools/.libs/lt-gst-launch-1.0 videotestsrc num-buffers=20 \! videobox bottom=1677722 \! videoconvert \! autovideosink and below is the stack trace.
+ Trace 234991
Funny part is, it crashes when bottom=1677722, but does not when it is bottom=1677721. So there is some logic which needs to be checked. The same crash happens in videocrop as well. Regards, Vineeth
And what videosink is used for your here, and what format is negotiated? Could you add -v to gst-launch-1.0 and paste the output of that?
*** Bug 743910 has been marked as a duplicate of this bug. ***
Hi Tim, It crashes with both ximagesink and glimagesink. i have pasted the output of -v to http://ur1.ca/k8f9x
Thanks, I can reproduce it with ximagesink.
This happens just after y*stride goes above 0x80000000 for what it's worth. So perhaps a signed int is used somewhere for an offset?
Does this still happen with git master? I don't get any crashes, but the pipeline errors out with all sinks I tried.
This still happens.. But not with the values mentioned above.. Tested for both videobox and videocrop for "bottom=214748364". Starting program: /home/vineethtm/gst/master/gstreamer/tools/.libs/lt-gst-launch-1.0 videotestsrc num-buffers=20 \! videobox bottom=214748364 \! videoconvert \! autovideosink [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Setting pipeline to PAUSED ... [New Thread 0xb7400b40 (LWP 30237)] [New Thread 0xb69ffb40 (LWP 30238)] Pipeline is PREROLLING ... [New Thread 0xb61feb40 (LWP 30239)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 235929
Thread 3063937856 (LWP 30238)
should we just check if the crop value exceeds the video dimensions and just ignore whichever value is higher than the dimensions?
That would make sense, yes. And maybe also checking why exactly it crashes here, it shouldn't crash (and should already check the boundaries), but maybe there's an overflow happening somewhere.
The problem here seems to be that of videotestsrc not being able to handle huge resolution. A simple pipeline like the below also crashes libtool --mode=execute gdb --args ../gstreamer/tools/gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,height=21474813,width=320 ! fakesink but it is not showing any backtrace Starting program: /home/vineethtm/gst/master/gstreamer/tools/.libs/lt-gst-launch-1.0 videotestsrc num-buffers=1 \! video/x-raw,height=21474813,width=320 \! fakesink [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Setting pipeline to PAUSED ... [New Thread 0xb75b1b40 (LWP 19240)] Pipeline is PREROLLING ... [New Thread 0xb6bffb40 (LWP 19241)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 235978
Thread 3076201280 (LWP 19240)
for some higher values i get (gst-launch-1.0:19078): GLib-ERROR **: /build/buildd/glib2.0-2.40.2/./glib/gmem.c:103: failed to allocate 1707695435 bytes Program received signal SIGTRAP, Trace/breakpoint trap. which is again not that much a problem due to memory limitations i guess...
This just fails here with a proper error: > gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,height=21474813,width=320 ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Failed to configure the buffer pool Additional debug info: gstbasesrc.c(3116): gst_base_src_decide_allocation_default (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Configuration is most likely invalid, please report this issue. ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... Please try to get a backtrace of the error that happens for you.
Also the one with videocrop fails the same way, without a crash.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!