I'm writing a text editor in python and gtk3 and I keep getting vague warnings from somewhere within glib when I close a window:
/usr/lib/python2.7/dist-packages/gi/types.py:47: Warning: invalid (NULL) pointer instance
return info.invoke(*args, **kwargs)
How can I debug this? I tried running it in gdb, hoping I might be able to learn something from a breakpoint at g_logv, but the warnings appear without triggering the breakpoint. I can't easily replace the log handler either because of https://bugzilla.gnome.org/show_bug.cgi?id=670507.
I've even tried altering the python file referenced in the message so that it always prints a python backtrace at that point, but it has to do it whether the error occurs or not and it gets called on every gobject method call, so it's difficult to interpret the results, and it still doesn't tell me anything about which pointer is null.