After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746620 - Segfault while executing g_value_unset at gst_structure_free in Android
Segfault while executing g_value_unset at gst_structure_free in Android
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.4.5
Other other
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-22 20:34 UTC by msielski
Modified: 2015-03-27 23:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description msielski 2015-03-22 20:34:00 UTC
Hi,

I have tried gstreamer-1.0-android-armv7-debug-1.4.5. I have used it with one
of the examples found at
http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials
"android-tutorial-3"

I have found out that the application is carshing when I rotate a phone.
I tried to track down the issue and I came to the conclusion that there
is an issue in the prebuilt gstreamer itself.

While rotating the phone the Activity is beeing destroyed and following native code is executed: gst_native_finalize function in tutorial-3.c. The call
triggers exit from the gst main loop in app_function (tutorial-3.c).

The application segfaults while executing following statement
gst_element_set_state (data->pipeline, GST_STATE_NULL);

I have debugged gst_element_set_state function and found out
that the sefaults happened in
g_value_unset (&field->value); // i == 3

Here is the stack trace:
g_value_unset()				(gststructure.c, line 383)
gst_structure_free()			(gstquery.c, line 195)
_gst_query_free()			(gstminiobject, line 465)
gst_mini_object_unref()			(gstquery.h, line 237)
gst_query_unref()			(gstbasetransform.c, line 816)
gst_base_transform_set_allocation()	(gstbasetransform.c, line 2372)
gst_base_transform_activate()		(gstbasetransform.c, line 2390)
gst_base_transform_sink_activate_mode()	()
gst_pad_activate_mode()			(gstpad.c, line 1031)
gst_pad_set_active()			(gstelement.c, line 2687)
activate_pads()				(gstiterator.c, line 612)
gst_iterator_fold()			(gstelement.c, line 2707)
iterator_activate_fold_with_resync()	(gstelement.c, line 2751)
gst_element_pads_activate()		(gstelement.c, line 2815)
gst_element_change_state_func()		()
gst_element_change_state()		()
gst_element_set_state_func()		()
gst_element_set_state()			()
gst_bin_element_set_state()		()
gst_bin_change_state_func()		()
gst_pipeline_change_state()		()
gst_element_change_state()		()
gst_element_set_state_func()		()
gst_element_set_state()			(tutorial-3.c, line 199)
app_function()
libc.so!__thread_entry()
libc.so!pthread_create()
0x00000000

Thank you for help in advance
Comment 1 Sebastian Dröge (slomo) 2015-03-23 08:39:46 UTC
Does this also happen with tutorial 4 or 5? Can you get a GStreamer debug log with level 6 on everything for this crash?
Comment 2 msielski 2015-03-23 19:40:36 UTC
Hi Sebastian,

Thank you for prompt response. I have verified "tutorial 5" and I got
identical effect (crash while rotating the phone - gst_native_finalize).
Could you please guide me how to enable these debug logs in GStreamer
and gather it on Android-based device?
Shall I rebuild gstreamer-1.0-android-armv7-debug-1.4.5 libraries?

Thank you for help in advance.

Best Regards

Marcin Sielski
Comment 3 msielski 2015-03-27 22:17:05 UTC
Hi,

Just for reference...
I have compiled gstreamer from 1.5.0 sources and it looks like problem has
been solved.

Best Regards

Marcin Sielski
Comment 4 Tim-Philipp Müller 2015-03-27 23:50:13 UTC
Great, thanks for testing and confirming it's no longer an issue in master!