GNOME Bugzilla – Bug 583378
libgstpython.so causes a segfault
Last modified: 2009-05-22 10:03:25 UTC
In the following circumstances libgstpython.so causes a segfault. - delete the registry - run python - import pgm (pigment) I've been able to reproduce it also with gst-inspect in another scenario different than desktop. In the pigment case I've got the following backtrace:
+ Trace 215627
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fb5ced0d6f0 (LWP 26549)] 0x00007fb5b9fc1dd9 in plugin_init (plugin=0x1518770) at gstpythonplugin.c:355 355 state = pyg_gil_state_ensure (); 0x00007fb5b9fc1dc8 <plugin_init+296>: xor %eax,%eax 0x00007fb5b9fc1dca <plugin_init+298>: callq 0x7fb5b9fc1518 <gst_debug_log@plt> 0x00007fb5b9fc1dcf <plugin_init+303>: mov 0x202202(%rip),%rax # 0x7fb5ba1c3fd8 <__JCR_LIST__+664> 0x00007fb5b9fc1dd6 <plugin_init+310>: mov (%rax),%rax 0x00007fb5b9fc1dd9 <plugin_init+313>: callq *0x160(%rax) 0x00007fb5b9fc1ddf <plugin_init+319>: movl $0x0,0x24(%rsp) Segfault at +313, rax is 0 then I suspect it's something related to null pointer.
Created attachment 135107 [details] [review] Use C/Python API and not pyg* API Could you try again with this patch ?
The provided patch fixes the issue.
commit 3ae49e9d619c57e5fa50068a6fc98323a439479c Author: Edward Hervey <bilboed@bilboed.com> Date: Fri May 22 12:05:28 2009 +0200 gstpythonplugin: Don't use pyg_gil_* in pure python. Fixes #583378 At this point, pygobject wasn't loaded yet ... cause pyg_gil_state_ensured to not be initialized to the proper method.