This backtrace shows the program fails on Python (or PyQt) code, not Glib code. I don't think the event loop has anything to do with this.