After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669968 - [python 3] Crash when implement do_startup method in GApplication subclass
[python 3] Crash when implement do_startup method in GApplication subclass
Status: RESOLVED DUPLICATE of bug 669157
Product: pygobject
Classification: Bindings
Component: introspection
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-13 07:09 UTC by Iven
Modified: 2012-04-23 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Iven 2012-02-13 07:09:51 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
Comment 1 Martin Pitt 2012-04-22 13:54:30 UTC
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?
Comment 2 Iven 2012-04-23 05:56:49 UTC
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?
Comment 3 Martin Pitt 2012-04-23 06:18:35 UTC
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.
Comment 4 Martin Pitt 2012-04-23 06:28:43 UTC
Oh, I see. It sometimes crashes and sometimes doesn't. Apparently I've just been lucky yesterday.
Comment 5 Martin Pitt 2012-04-23 06:30:36 UTC
Likely related to bug 669157, i. e. crash on callbacks with Python 3.
Comment 6 Martin Pitt 2012-04-23 16:49:40 UTC
Will mark as duplicate for now, and verify once bug 669157 is fixed.

*** This bug has been marked as a duplicate of bug 669157 ***