GNOME Bugzilla – Bug 688244
Accessing GtkStyle of TreeView triggers Stack overflow protection and returns empty array
Last modified: 2018-01-10 20:20:37 UTC
I have a following snippet working in PyGTK: <code> >>> import gtk >>> gtk.TreeView().get_style().text[gtk.STATE_INSENSITIVE].to_string() '#753075307530' </code> PyGObject version: <code> >>> from gi.repository import Gtk >>> Gtk.TreeView().get_style().text[Gtk.StateType.INSENSITIVE].to_string() ** (.:11505): CRITICAL **: Stack overflow protection. Can't copy array element into GIArgument. Traceback (most recent call last):
+ Trace 231170
>>> Gtk.TreeView().get_style().text ** (.:11505): CRITICAL **: Stack overflow protection. Can't copy array element into GIArgument. [] </code>
Correct version of my python-gobject is 3.4.0-1
Note: the .gir seems alright: <class name="Style" [...] <field name="text"> <array zero-terminated="0" c:type="GdkColor" fixed-size="5"> <type name="Gdk.Color" c:type="GdkColor"/> </array> </field> So it seems we don't handle this case in _pygi_argument_to_object().
I believe this will be fixed with work going on in bug 726999.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/38.