views:

193

answers:

1

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.

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
You could also try running Python in verbose mode by using python -v.
Goose Bumper