Embedded Python C program segfaults in subsequent call after reinitialization
@ag
Submitted by Andrey Gursky Link to original bug (#677091)
Description
Created attachment 215239 minimal example for problem demonstration
The minimal example illustrates the problem.
The output:
$ ./test_embed_python
running embedded python...
------------ script end ----------
...done
running embedded python...
Segmentation fault
The script test.py:
#from gi.repository import GLib
#from gi.repository import Gtk
#from gi.repository import Cairo
#from gi.repository import Pango
from gi.repository import Gio
def call_python():
print(" ------------ script end ----------")
return 0
if __name__ == '__main__':
call_python()
Once at least one package from the gi.repository is imported, the embedded python fails to run it after the reinitialization (Py_Initialize/Finalize).
Attachment 215239, "minimal example for problem demonstration":
test_embed_python.c
Depends on
Edited by Christoph Reiter