sigsegv in __static_initialization_and_destruction_0
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Good day!
I'm trying to embed pythonqt in lmms plugin. The plugin is implemented as a dynamic library. Somewhere inside the plugin I call PythonQt::init. The result is a sigsegv during library load when static vars are initializing. What are the limitations on using PythonQt? There may be a problem with threads? Or the problem is that initialization happens in the library. I'm using Ubuntu 14.04.2, gcc 4.8.4
I will be glad if someone help me.
BackTrace:
#0 0x000000000016eab6 in ?? ()
#1 0x00007fffa3a053ff in static_initialization_and_destruction_0 (initialize_p=1, priority=65535) at /usr/include/c++/4.8/iostream:74
#2 0x00007fffa3a05431 in _GLOBALsub_I_PythonQtStdDecorators.cpp(void) () at PythonQtStdDecorators.cpp:392
#3 0x00007ffff7dea13a in call_init (l=<optimized out="">, argc=argc@entry=1, argv=argv@entry=0x7fffffffe028, env=env@entry=0x7fffffffe038)
at dl-init.c:78
#4 0x00007ffff7dea223 in call_init (env=<optimized out="">, argv=<optimized out="">, argc=<optimized out="">, l=<optimized out="">) at dl-init.c:36
#5 _dl_init (main_map=main_map@entry=0xde7660, argc=1, argv=0x7fffffffe028, env=0x7fffffffe038) at dl-init.c:126
#6 0x00007ffff7deec70 in dl_open_worker (a=a@entry=0x7fffffffcfe8) at dl-open.c:577
#7 0x00007ffff7de9ff4 in _dl_catch_error (objname=objname@entry=0x7fffffffcfd8, errstring=errstring@entry=0x7fffffffcfe0,
mallocedp=mallocedp@entry=0x7fffffffcfd0, operate=operate@entry=0x7ffff7dee9a0 <dl_open_worker>, args=args@entry=0x7fffffffcfe8)
at dl-error.c:187
#8 0x00007ffff7dee3bb in _dl_open (file=0xde7608 "/home/dal/workspace/lmms/build/plugins/libpython_runner.so", mode=-2147483647,
caller_dlopen=<optimized out="">, nsid=-2, argc=1, argv=0x7fffffffe028, env=0x7fffffffe038) at dl-open.c:661
#9 0x00007ffff20da02b in dlopen_doit (a=a@entry=0x7fffffffd200) at dlopen.c:66
#10 0x00007ffff7de9ff4 in _dl_catch_error (objname=0x94afa0, errstring=0x94afa8, mallocedp=0x94af98, operate=0x7ffff20d9fd0 <dlopen_doit>,
args=0x7fffffffd200) at dl-error.c:187
#11 0x00007ffff20da62d in _dlerror_run (operate=operate@entry=0x7ffff20d9fd0 <dlopen_doit>, args=args@entry=0x7fffffffd200) at dlerror.c:163
#12 0x00007ffff20da0c1 in __dlopen (file=<optimized out="">, mode=<optimized out="">) at dlopen.c:87
#13 0x00007ffff694d6b8 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#14 0x00007ffff694859a in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x000000000052c3e8 in PluginFactory::discoverPlugins (this=0xda6340) at /home/dal/workspace/lmms/src/core/PluginFactory.cpp:146
#16 0x000000000052be6e in PluginFactory::PluginFactory (this=0xda6340) at /home/dal/workspace/lmms/src/core/PluginFactory.cpp:74
#17 0x000000000052bef9 in PluginFactory::instance () at /home/dal/workspace/lmms/src/core/PluginFactory.cpp:85
#18 0x0000000000590614 in PluginDescList::PluginDescList (this=0xda63d0, parent=0xd945f0) at /home/dal/workspace/lmms/src/gui/PluginBrowser.cpp:98
#19 0x000000000059045c in PluginBrowser::PluginBrowser (this=0xd94390, _parent=0xd93ce0) at /home/dal/workspace/lmms/src/gui/PluginBrowser.cpp:75
#20 0x00000000005840eb in MainWindow::MainWindow (this=0xd8da70) at /home/dal/workspace/lmms/src/gui/MainWindow.cpp:102
#21 0x000000000057e220 in GuiApplication::GuiApplication (this=0xb4f180) at /home/dal/workspace/lmms/src/gui/GuiApplication.cpp:99
#22 0x00000000004d2169 in main (argc=1, argv=0x7fffffffe028) at /home/dal/workspace/lmms/src/core/main.cpp:446
Last edit: dalduba 2015-07-11
It works now. Something was wrong with linking. But I did not understand exactly what the problem was. I think that wrong python was linked.