GNOME Bugzilla – Bug 669968
[python 3] Crash when implement do_startup method in GApplication subclass
Last modified: 2012-04-23 16:49:40 UTC
When I subclass the GApplication class, and implement do_startup method in my program, python crashes: GLib-GIO-CRITICAL **: GApplication subclass '__main__+Application' failed to chain up on ::startup (from start of override function) Segmentation fault (core dumped) Everything works well if I remove the do_startup method. The code is attached. I'm using Ubuntu 12.04 x86_64 with pygobject 3.1.0. This bug affects both Python2 and Python3. It seems that the bug doesn't affect Arch Linux, I've also submitted a bug in Ubuntu, but no reply: https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/904168
The test case attached to the Ubuntu bug works. I get $ python3 /tmp/do_startup.py GLib-GIO-CRITICAL **: GApplication subclass '__main__+Application' failed to chain up on ::startup (from start of override function) and a clean exit code 0. do_startup() actually does get called. I think this is because the functions are just empty stubs. Can you please attach a more complete test case?
I've tested this with the latest live image(20120421, amd64), and the segment fault still exists. The system is fresh installed, and I only installed python3-gi on it. What do you mean by a more complete test case?
Ah, I can reproduce this now. Odd that it wasn't crashing yesterday, but I might have run this in a local build tree or so.
Oh, I see. It sometimes crashes and sometimes doesn't. Apparently I've just been lucky yesterday.
Likely related to bug 669157, i. e. crash on callbacks with Python 3.
Will mark as duplicate for now, and verify once bug 669157 is fixed. *** This bug has been marked as a duplicate of bug 669157 ***