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 635060 - Parameter counting is broken
Parameter counting is broken
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-17 09:41 UTC by Martin Pitt
Modified: 2011-01-28 10:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Pitt 2010-11-17 09:41:18 UTC
With pygobject 2.26.0 and 2.27.0, I get a crash when trying to call Gtk.init() or Gtk.init_check():

$ python -c 'from gi.repository import Gtk; Gtk.require_version("3.0"); Gtk.init()'
ERROR:/home/martin/ubuntu/build-area/pygobject-2.27.0/gi/pygi-invoke.c:883:_free_invocation_state: assertion failed: (backup_args_pos == state->n_backup_args)
Comment 1 johnp 2010-11-17 16:44:43 UTC
You shouldn't need to call Gtk.init().  It is called by the override.  You are missing parameters (argv).  I need to fix the parameter counting though I think I will do this with a rewrite of the invoke code.
Comment 2 Tomeu Vizoso 2011-01-28 10:24:26 UTC
Seems to have been fixed already?

[tomeu@localhost (master) pygobject]$ python -c 'from gi.repository import Gtk; Gtk.require_version("3.0"); Gtk.init()'
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  • File "<string>", line 1 in <module>
  • File "gi/types.py", line 44 in function
    return info.invoke(*args)
TypeError: init() takes exactly 1 argument(s) (0 given)