GNOME Bugzilla – Bug 746620
Segfault while executing g_value_unset at gst_structure_free in Android
Last modified: 2015-03-27 23:50:13 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
Does this also happen with tutorial 4 or 5? Can you get a GStreamer debug log with level 6 on everything for this crash?
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
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
Great, thanks for testing and confirming it's no longer an issue in master!