GNOME Bugzilla – Bug 729617
playback-test: crash when setting buffer-size property on playbin
Last modified: 2014-05-06 07:18:32 UTC
Created attachment 275935 [details] [review] Fix for the crash. [Note : change related to g_print in the file is from gst-indent tool for previous commit] There was segmentation fault when ran the playback-test (gst-plugins-base/tests/examples/playback). Here is the excerpts of the logs -------------------------------------------------------------------------- [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". [New Thread 0xb6bfab40 (LWP 7187)] [New Thread 0xb61ffb40 (LWP 7188)] Setting URI: (null) [New Thread 0xb5672b40 (LWP 7189)] Window realize: video window XID = 73400331 PLAY pipeline Program received signal SIGSEGV, Segmentation fault. 0xb75cb016 in ?? () from /lib/i386-linux-gnu/libc.so.6 ----------------------------------------------------------------------------- This problem occured when -ve value set for the buffer-size for "app->pipeline" in playback-test.c Patch attached for this bug. Please review. Note : other change related to g_print in the file is auto-fix from the gst-indent tool (for the previous commit).
commit 07a637e2847d56d0f2b0c0ac9095bf37dd324e26 Author: Ravi Kiran K N <ravi.kiran@samsung.com> Date: Tue May 6 11:31:18 2014 +0530 playback-test: Set buffer-size only for non-negative size https://bugzilla.gnome.org/show_bug.cgi?id=729617
I don't think this patch is right. It doesn't fix the actual problem, and -1 is a valid value for the buffer-size property. commit e5b4e30baab2378e9bb63550b815ff923bf8c806 Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue May 6 07:51:11 2014 +0100 examples: playback-test: fix crashes when setting buffer-size playbin's buffer-size property takes a gint, not a gint64, so only pass the bits expected to the vararg function, or the terminator might not be found, leading to crashes, esp. with negative numbers. Spotted by Ravi Kiran K N <ravi.kiran@samsung.com> https://bugzilla.gnome.org/show_bug.cgi?id=729617 commit bb74096870a4b7cfbad3461c5b64c038e2d35150 Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue May 6 07:50:16 2014 +0100 examples: fix indentation of playback-test commit a8396ce5dbdd50f1cfd9d1786196e0527205d7ce Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue May 6 08:13:24 2014 +0100 Revert "playback-test: Set buffer-size only for non-negative size" This reverts commit 07a637e2847d56d0f2b0c0ac9095bf37dd324e26.
PS: when reporting a crash, it is usually helpful to also provide a full stack trace for it.