I have a python module that imports a module generated with swig. When I try to call the show() function of matplotlib later in that module, python crashes without any hint, what went wrong. When I comment the import statement with the swig generated module out, everything works fine. Does anybody have a clue to what could be the reason for this behaviour? I'm aware that this is a very unspecific formulation of the problem. But, I don't expect a solution to my problem, just a hint to where I could look at to find the problem. Thanks.
views:
193answers:
1
A:
I'd start with running the script under gdb and looking at the stack trace. Recent versions of gdb have built in support for python debugging.
$ gdb python
(gdb) run /path/to/script.py
# wait for crash #
(gdb) bt
# stack trace here #
More information here.
Mark
2010-03-17 19:42:53
You could also try running Python in verbose mode by using python -v.
Goose Bumper
2010-03-17 20:39:30