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 583378 - causes a segfault causes a segfault
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal major
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2009-05-20 21:39 UTC by Josep Torra Valles
Modified: 2009-05-22 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---

Use C/Python API and not pyg* API (669 bytes, patch)
2009-05-21 14:42 UTC, Edward Hervey
committed Details | Review

Description Josep Torra Valles 2009-05-20 21:39:02 UTC
In the following circumstances 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:

  • #0 plugin_init
    at gstpythonplugin.c line 355
  • #1 gst_plugin_register_func
    at gstplugin.c line 416
  • #2 gst_plugin_load_file
    at gstplugin.c line 629
  • #3 gst_registry_scan_path_level
    at gstregistry.c line 916
  • #4 gst_registry_scan_path
    at gstregistry.c line 952
  • #5 scan_and_update_registry
    at gst.c line 724
  • #6 ensure_current_registry
    at gst.c line 786
  • #7 init_post
    at gst.c line 1100
  • #8 g_option_context_parse
    from /usr/lib/
  • #9 gst_init_check
    at gst.c line 435
  • #10 pgm_init_check
    at ./pgm.c line 226
  • #11 init_pgm
    at pgmmodule.c line 62

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.
Comment 1 Edward Hervey 2009-05-21 14:42:21 UTC
Created attachment 135107 [details] [review]
Use C/Python API and not pyg* API

Could you try again with this patch ?
Comment 2 Josep Torra Valles 2009-05-21 16:10:25 UTC
The provided patch fixes the issue.
Comment 3 Edward Hervey 2009-05-22 10:03:25 UTC
commit 3ae49e9d619c57e5fa50068a6fc98323a439479c
Author: Edward Hervey <>
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.