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 688244 - Accessing GtkStyle of TreeView triggers Stack overflow protection and returns empty array
Accessing GtkStyle of TreeView triggers Stack overflow protection and returns...
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on: 726999
Blocks:
 
 
Reported: 2012-11-13 13:05 UTC by Izidor Matušov
Modified: 2018-01-10 20:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Izidor Matušov 2012-11-13 13:05:08 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):
  • File "<stdin>", line 1 in <module>
IndexError: list index out of range
>>> Gtk.TreeView().get_style().text

** (.:11505): CRITICAL **: Stack overflow protection. Can't copy array element into GIArgument.
[]
</code>
Comment 1 Izidor Matušov 2012-11-13 13:37:08 UTC
Correct version of my python-gobject is 3.4.0-1
Comment 2 Martin Pitt 2012-11-19 06:58:08 UTC
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().
Comment 3 Simon Feltman 2014-08-06 04:51:04 UTC
I believe this will be fixed with work going on in bug 726999.
Comment 4 GNOME Infrastructure Team 2018-01-10 20:20:37 UTC
-- 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.