Investigating a Python crash with gdb

January 20, 2004

Here’s how I recently investigated a python crash using gdb. It requires two windows.

1. I put my test program into a script called ‘’

2. In window A, I typed ‘python’

3. In window B, I typed ‘gdb python [PID of python from window A]’

4. At the gdb prompt in window B, I typed ‘cont’

5. In window A I typed ‘import test_gtkgl’ (which executed the script)’

6. In window B, I got lots and lots of lines that looked like:

Reading symbols for shared libraries . done

and then finally…

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x006a0ee0 in g_type_check_instance_cast ()


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: