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 343980 - [solaris] import gst crash python
[solaris] import gst crash python
Product: GStreamer
Classification: Platform
Component: gst-python
Other opensolaris
: Normal critical
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-06-06 05:50 UTC by jerry tan
Modified: 2007-03-01 13:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14

fix (531 bytes, patch)
2006-12-14 21:32 UTC, Jan Schmidt
none Details | Review
take 2 (518 bytes, patch)
2006-12-14 21:35 UTC, Jan Schmidt
committed Details | Review

Description jerry tan 2006-06-06 05:50:12 UTC
"import gst", 
python will crash.

I am using gstreamer0.10, with python 2.4, gst-python 0.10
on solaris.

the stack is 
Current function is pyinterfaces_register_classes
 1534       pyg_register_interface(d, "XOverlay", GST_TYPE_X_OVERLAY, &PyGstXOve rlay_Type);
(dbx) where
=>[1] pyinterfaces_register_classes(d = 0x81ad57c), line 1534 in "interfaces.c"
  [2] initinterfaces(), line 44 in "interfacesmodule.c"
  [3] _PyImport_LoadDynamicModule(0x80e1ad4, 0x81b0034, 0xfee92040), at 0xfef439 a3
  [4] imp_load_dynamic(0x0, 0x80e7fcc), at 0xfef434ec
  [5] PyCFunction_Call(0x80e8f4c, 0x80e7fcc, 0x0), at 0xfef0015e
  [6] call_function(0x8045044, 0x3), at 0xfef2f31f
  [7] PyEval_EvalFrame(0x8114a0c), at 0xfef2ad68
  [8] PyEval_EvalCodeEx(0x80e47a0, 0x80e202c, 0x0, 0x80e7d30, 0x4, 0x0, 0x0, 0x8 0ea0b8, 0x1, 0x0), at 0xfef2dfae
  [9] function_call(0x80e58b4, 0x80e7d24, 0x0), at 0xfeef2d9a
  [10] PyObject_Call(0x80e58b4, 0x80e7d24, 0x0), at 0xfeee2812
  [11] instancemethod_call(0x80e18ec, 0x80e7d24, 0x0), at 0xfeee850c
  [12] PyObject_Call(0x80e18ec, 0x80e7d24, 0x0), at 0xfeee2812
  [13] call_function(0x8045424, 0x4), at 0xfef2ef5c
  [14] PyEval_EvalFrame(0x80b329c), at 0xfef2ad68
  [15] PyEval_EvalCodeEx(0x80e40a0, 0x80e213c, 0x0, 0x811ce10, 0x4, 0x811ce20, 0 x0, 0x80ea258, 0x1, 0x0), at 0xfef2dfae
  [16] fast_function(0x80eb25c, 0x80455a4, 0x4, 0x4, 0x0), at 0xfef2f4a3
  [17] call_function(0x80455a4, 0x3), at 0xfef2efb9
  [18] PyEval_EvalFrame(0x811cc9c), at 0xfef2ad68
  [19] fast_function(0x80e5d4c, 0x80456b4, 0x3, 0x3, 0x0), at 0xfef2f422
  [20] call_function(0x80456b4, 0x2), at 0xfef2efb9
  [21] PyEval_EvalFrame(0x80d25fc), at 0xfef2ad68
  [22] PyEval_EvalCodeEx(0x80e9460, 0x80e202c, 0x0, 0x811cc70, 0x4, 0x811cc80, 0 x0, 0x80ea218, 0x1, 0x0), at 0xfef2dfae
  [23] fast_function(0x80eb144, 0x8045834, 0x4, 0x4, 0x0), at 0xfef2f4a3
  [24] call_function(0x8045834, 0x3), at 0xfef2efb9
  [25] PyEval_EvalFrame(0x811cb04), at 0xfef2ad68
  [26] fast_function(0x80eb09c, 0x8045944, 0x3, 0x3, 0x0), at 0xfef2f422
  [27] call_function(0x8045944, 0x2), at 0xfef2efb9
  [28] PyEval_EvalFrame(0x80c0984), at 0xfef2ad68
  [29] PyEval_EvalCodeEx(0x80e92a0, 0x80e202c, 0x0, 0x809eea8, 0x5, 0x0, 0x0, 0x 80e7e98, 0x3, 0x0), at 0xfef2dfae
  [30] function_call(0x80eb02c, 0x809ee9c, 0x0), at 0xfeef2d9a
  [31] PyObject_Call(0x80eb02c, 0x809ee9c, 0x0), at 0xfeee2812
  [32] instancemethod_call(0x8076b94, 0x809ee9c, 0x0), at 0xfeee850c
  [33] PyObject_Call(0x8076b94, 0x80e1554, 0x0), at 0xfeee2812
  [34] PyEval_CallObjectWithKeywords(0x8076b94, 0x80e1554, 0x0), at 0xfef2ed51
  [35] PyEval_EvalFrame(0x8120ffc), at 0xfef2aec3
  [36] PyEval_EvalCodeEx(0x80e4020, 0x80e20b4, 0x80e20b4, 0x0, 0x0, 0x0, 0x0, 0x 0, 0x0, 0x0), at 0xfef2dfae
  [37] PyEval_EvalCode(0x80e4020, 0x80e20b4, 0x80e20b4), at 0xfef2a2f9
  [38] PyImport_ExecCodeModuleEx(0x8046b6c, 0x80e4020, 0x8045dec), at 0xfef40d62 
  [39] load_source_module(0x8046b6c, 0x8045dec, 0xfee92030), at 0xfef41165
  [40] load_module(0x8046b6c, 0xfee92030, 0x804625c, 0x1, 0x0), at 0xfef41db3
  [41] load_package(0x8046b6c, 0x80466cc), at 0xfef412dd
  [42] load_module(0x8046b6c, 0x0, 0x80466cc, 0x5, 0x0), at 0xfef41d6b
  [43] import_submodule(0xfef87f88, 0x8046b6c, 0x8046b6c), at 0xfef42a37
  [44] load_next(0xfef87f88, 0xfef87f88, 0x8046f8c, 0x8046b6c, 0x8046f80), at 0x fef425ba
  [45] import_module_ex(0x0, 0x8078824, 0x8078824, 0xfef87f88), at 0xfef423a7
  [46] PyImport_ImportModuleEx(0x80dfd54, 0x8078824, 0x8078824, 0xfef87f88), at 0xfef424d4
  [47] builtin___import__(0x0, 0x80e1054), at 0xfef24087
  [48] PyCFunction_Call(0x8069d6c, 0x80e1054, 0x0), at 0xfef0015e
  [49] PyObject_Call(0x8069d6c, 0x80e1054, 0x0), at 0xfeee2812
  [50] PyEval_CallObjectWithKeywords(0x8069d6c, 0x80e1054, 0x0), at 0xfef2ed51
  [51] PyEval_EvalFrame(0x8118d14), at 0xfef2aec3
  [52] PyEval_EvalCodeEx(0x8099ca0, 0x8078824, 0x8078824, 0x0, 0x0, 0x0, 0x0, 0x 0, 0x0, 0x0), at 0xfef2dfae
  [53] PyEval_EvalCode(0x8099ca0, 0x8078824, 0x8078824), at 0xfef2a2f9
  [54] run_node(0x8061308, 0xfef6e0d4, 0x8078824, 0x8078824, 0x804726c), at 0xfe f49027
  [55] PyRun_InteractiveOneFlags(0xfee92000, 0xfef6e0d4, 0x804726c), at 0xfef480 3c
  [56] PyRun_InteractiveLoopFlags(0xfee92000, 0xfef6e0d4, 0x804726c), at 0xfef47 e9e
  [57] PyRun_AnyFileExFlags(0xfee92000, 0xfef6e0d4, 0x0, 0x804726c), at 0xfef47d 97
  [58] Py_Main(0x1, 0x80472c0), at 0xfef4d93a
  [59] main(0x1, 0x80472c0, 0x80472c8), at 0x80506e2
Comment 1 Michael Smith 2006-06-06 13:08:54 UTC
Please let us know what version of gstreamer core and gst-python you're using. If it's not the  latest release of both, please re-test using the latest.
Comment 2 Edward Hervey 2006-06-06 13:37:15 UTC
also, make sure you have gst-plugins-base (since that's where the interfaces are)
Comment 3 jerry tan 2006-06-07 10:06:50 UTC
I am using GStreamer 0.10.6 and Base Plugins 0.10.7
and gst-python-0.10.4.

I meet the crash if I import gst in python console.

Current function is pyinterfaces_register_classes
 1534       pyg_register_interface(d, "XOverlay", GST_TYPE_X_OVERLAY,
&PyGstXOve rlay_Type);
(dbx) where
=>[1] pyinterfaces_register_classes(d = 0x81ad57c), line 1534 in "interfaces.c"
  [2] initinterfaces(), line 44 in "interfacesmodule.c"
  [3] _PyImport_LoadDynamicModule(0x80e1ad4, 0x81b0034, 0xfee92040), at
0xfef439 a3

BTW: I am running it on solaris 10 x86.
Comment 4 Edward Hervey 2006-06-07 10:16:08 UTC
which version of pygtk and glib do you have ?
Comment 5 jerry tan 2006-06-07 10:33:47 UTC
glib 2.10.2
pygtk 2.8.6
Comment 6 Edward Hervey 2006-10-15 11:05:49 UTC
All these problems are related to modules (C and python) exporting wrong symbols. It should have been fixed in all GStreamer modules (core/gst-plugins-*/gst-python).

Could you try with latest cvs of gstreamer/gst-plugins-base/gst-python.
Comment 7 Edward Hervey 2006-11-30 19:26:56 UTC
jerry : ping , could you test with latest pre-release or cvs and confirm that you don't have the issue anymore ?
Comment 8 Edward Hervey 2006-12-04 16:07:54 UTC
Closing. If you have the issue again with the new release, re-open.
Comment 9 Brian Cameron 2006-12-06 18:18:37 UTC
I just tested this with Jokosher after building and installing the new version of the gst-python bindings (0.10.6).  Still seeing a core dump, though with a slightly different stack trace:

core 'core' of 113795:  python Jokosher/Jokosher
 00000047 ???????? (8366b54)
 c18b332b initinterfaces (8063604, 8044e0c, 843aaac, 1, a, c4e76210) + 5b
 c4f3629b _PyImport_LoadDynamicModule (8044e0c, 804497c, c4e76210) + 83
 c4f34520 load_module (8044e0c, c4e76210, 804497c, 3, 0) + 80
 c4f35407 import_submodule (8061884, 8044e10, 8044e0c) + fb
 c4f34dce load_next (8061884, c4f740d0, 804522c, 8044e0c, 8045220) + a2
 c4f34a2c import_module_ex (0, 82d3c64, 82d3c64, c4f740d0) + 48
 c4f34b55 PyImport_ImportModuleEx (814d1c4, 82d3c64, 82d3c64, c4f740d0) + 1d
 c4f15cea builtin___import__ (0, 8446554) + 4e
 c4ef107f PyCFunction_Call (8069d6c, 8446554, 0) + 15f
 c4ed2375 PyObject_Call (8069d6c, 8446554, 0) + 1d
 c4f20da4 PyEval_CallObjectWithKeywords (8069d6c, 8446554, 0) + b8
 c4f1ce36 PyEval_EvalFrame (833cf44) + d02
 c4f2000a PyEval_EvalCodeEx (843c120, 82d3c64, 82d3c64, 0, 0, 0) + 732
 c4f1c12e PyEval_EvalCode (843c120, 82d3c64, 82d3c64) + 22
 c4f33228 PyImport_ExecCodeModuleEx (80461ac, 843c120, 804543c) + c0
 c4f337ae load_source_module (80461ac, 804543c, c4e76200) + e6
 c4f3454c load_module (80461ac, c4e76200, 80458ac, 1, 0) + ac
 c4f338df load_package (80461ac, 8045d1c) + ef
 c4f3450a load_module (80461ac, 0, 8045d1c, 5, 0) + 6a
 c4f35407 import_submodule (c4f740d0, 80461ac, 80461ac) + fb
 c4f34dce load_next (c4f740d0, c4f740d0, 80465cc, 80461ac, 80465c0) + a2
 c4f34a2c import_module_ex (0, 82d3acc, 82d3acc, c4f740d0) + 48
 c4f34b55 PyImport_ImportModuleEx (80f4eb4, 82d3acc, 82d3acc, c4f740d0) + 1d
 c4f15cea builtin___import__ (0, 82c4d24) + 4e
 c4ef107f PyCFunction_Call (8069d6c, 82c4d24, 0) + 15f
 c4ed2375 PyObject_Call (8069d6c, 82c4d24, 0) + 1d
 c4f20da4 PyEval_CallObjectWithKeywords (8069d6c, 82c4d24, 0) + b8
 c4f1ce36 PyEval_EvalFrame (80c07e4) + d02
 c4f2000a PyEval_EvalCodeEx (84501a0, 82d3acc, 82d3acc, 0, 0, 0) + 732
 c4f1c12e PyEval_EvalCode (84501a0, 82d3acc, 82d3acc) + 22
 c4f33228 PyImport_ExecCodeModuleEx (80470dc, 84501a0, 8046c4c) + c0
 c4f337ae load_source_module (80470dc, 8046c4c, c4e761f0) + e6
 c4f3454c load_module (80470dc, c4e761f0, 8046c4c, 1, 0) + ac
 c4f35407 import_submodule (c4f740d0, 80470dc, 80470dc) + fb
 c4f34dce load_next (c4f740d0, c4f740d0, 80474fc, 80470dc, 80474f0) + a2
 c4f34a2c import_module_ex (0, 0, 0, 0) + 48
 c4f34b55 PyImport_ImportModuleEx (80decb4, 0, 0, 0) + 1d
 c4f15cea builtin___import__ (0, 80873ac) + 4e
 c4ef107f PyCFunction_Call (8069d6c, 80873ac, 0) + 15f
 c4f21302 call_function (8047624, 1) + 406
 c4f1ccd9 PyEval_EvalFrame (8120abc) + ba5
 c4f21408 fast_function (80d8f0c, 8047734, 1, 1, 0) + a8
 c4f20fd6 call_function (8047734, 1) + da
 c4f1ccd9 PyEval_EvalFrame (80a11b4) + ba5
 c4f2000a PyEval_EvalCodeEx (80d9ba0, 8079824, 8079824, 0, 0, 0) + 732
 c4f1c12e PyEval_EvalCode (80d9ba0, 8079824, 8079824) + 22
 c4f3bb35 run_node (80613c8, 8047ae3, 8079824, 8079824, 804798c) + 35
 c4f3baf7 run_err_node (80613c8, 8047ae3, 8079824, 8079824, 804798c) + 1f
 c4f3bace PyRun_FileExFlags (c4e761f0, 8047ae3, 101, 8079824, 8079824, 1) + 5e
 c4f3ae5f PyRun_SimpleFileExFlags (c4e761f0, 8047ae3, 1, 804798c) + 12f
 c4f3a96a PyRun_AnyFileExFlags (c4e761f0, 8047ae3, 1, 804798c) + 56
 c4f4077a Py_Main  (2, 80479d8) + 75a
 08050799 main     (2, 80479d8, 80479e4) + 11
 080506fa _start   (2, 8047adc, 8047ae3, 0, 8047af5, 8047b09) + 7a
Comment 10 Edward Hervey 2006-12-06 20:09:22 UTC
Brian, As I said in Comment #6, it's not a gst-python issue, it's related to symbols being exported.
Could you try with latest cvs of gstreamer/gst-plugins-base (and 0.10.6 of gst-python) ?
Comment 11 Brian Cameron 2006-12-06 21:36:48 UTC
Oh sorry.  I won't be able to look into this right away.  When will the next gst-plugins-base be released?
Comment 12 Edward Hervey 2006-12-07 07:32:47 UTC
They were released about 4 hours ago :) So could you please test with gstreamer and gst-plugins-base 0.10.11 and gst-python 0.10.6.
Comment 13 Brian Cameron 2006-12-07 20:09:53 UTC
I updated to GStreamer/plugins-base 0.10.11 and gst-python 0.10.6 and I am sorry to report I am still seeing the same crash.
Comment 14 Jan Schmidt 2006-12-14 21:32:18 UTC
Created attachment 78391 [details] [review]

The attached patch fixes it for me. I don't understand how gst-python works anywhere without though, which worries me. I think it boils down to a symbol resolution issue, as Edward mentioned, but a symbol resolution issue between the gst-python modules rather than in gstreamer libraries.
Comment 15 Jan Schmidt 2006-12-14 21:35:29 UTC
Created attachment 78393 [details] [review]
take 2

Sorry, let's try that again, without typing it wrong.
Comment 16 Jan Schmidt 2006-12-14 22:14:15 UTC
With this patch, and a manual install of python's setuptools I can get Jokosher to launch. It doesn't get very far though - it had problems creating a new project, and it seems to be looking for Alsa devices specifically, instead of probing the available sound backends and finding SunAudio, but these are bugs for the Jokosher guys to look at.

Comment 17 jerry tan 2006-12-26 09:43:17 UTC
yes, with this patch,
import gst wont crash anymore on solaris x86.

I test it on solaris x86, using gstreamer 0.10.11, gst-py 0.10.6
Comment 18 jerry tan 2006-12-26 10:03:09 UTC
after I install pygtk, and test some example of gst-py, 
such as using to play some audio or video files

yes, it works.
Comment 19 Edward Hervey 2007-01-09 06:57:43 UTC
Question to all those who tried that patch : It seems the problem was in fact fixed upstream in GStreamer core (See bug #391278).

Could you try removing the patch above and trying to see if latest cvs of core fixes the issue ? If so, this bug is a duplicate of the other one.
Comment 20 jerry tan 2007-01-09 08:31:15 UTC

Remove the patch and add the patch of bug 391278 , still crash.

Comment 21 Edward Hervey 2007-01-09 08:47:33 UTC
no, that's not what I meant. I didn't say to apply the patch of #391278, I said to use cvs of core. The patch commited is not the same as the proposed one.
Comment 22 Tim-Philipp Müller 2007-01-09 09:14:11 UTC
Indeed, the patch from bug #391278 should not be used. It won't have any effect on Solaris, at least not if Forte is used as compiler.
Comment 23 jerry tan 2007-01-09 10:29:09 UTC
After I build gstreamer 0.10.11 from cvs trunk, 
without the patch for this bug, 
import gst will crash.

Comment 24 Jan Schmidt 2007-01-10 23:17:33 UTC
Re #19: "Question to all those who tried that patch : It seems the problem was in fact fixed upstream in GStreamer core (See bug #391278)."

How are you linking these 2 bugs together at all? Do you have any evidence that the g_thread_init stuff is at all related, or are you just claiming it arbitrarily?

I don't think you're right - I believe the problem is caused by different symbol resolution rules on Solaris, and that it's luck that it works on Linux. It seems to me the extra gobject_init() call needs to be there on Linux too.

Comment 25 jerry tan 2007-03-01 09:33:26 UTC
how is the patch now?
Comment 26 Edward Hervey 2007-03-01 13:47:33 UTC
It fixes the same issue on some MIPS machine. Since this patch doesn't break existing behaviour, it's going in.

2007-03-01  Jan Schmidt  <>

	reviewed by: Edward Hervey  <>

	* gst/interfacesmodule.c: (initinterfaces):
	initialize pygobject in the gst.interfaces modules. The absence of it
	causes segfaults on Solaris and MIPS machines.
	Fixes #343980