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 695420 - Crash when setting property of type object to a value with wrong type
Crash when setting property of type object to a value with wrong type
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-08 02:13 UTC by Simon Feltman
Modified: 2013-03-08 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Give more informative error when setting property to incorrect type (1.21 KB, patch)
2013-03-08 02:18 UTC, Simon Feltman
committed Details | Review
Remove skipping of object property tests (2.39 KB, patch)
2013-03-08 02:18 UTC, Simon Feltman
committed Details | Review
Fix crash when setting property of type object to an incorrect type (3.33 KB, patch)
2013-03-08 02:19 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-03-08 02:13:50 UTC
from gi.repository import Gtk
button = Gtk.Button()
button.props.child = 'not_an_object'

Segmentation Fault
Comment 1 Simon Feltman 2013-03-08 02:18:56 UTC
Created attachment 238351 [details] [review]
Give more informative error when setting property to incorrect type
Comment 2 Simon Feltman 2013-03-08 02:18:58 UTC
Created attachment 238352 [details] [review]
Remove skipping of object property tests

These were showing up as unexpected successes now that bug 675726
is fixed.
Comment 3 Simon Feltman 2013-03-08 02:19:01 UTC
Created attachment 238353 [details] [review]
Fix crash when setting property of type object to an incorrect type

Add type check when marshaling an object from Python for GObject types.
Add PyGObject_Type as part of the pygobject API to check for this.
Comment 4 Martin Pitt 2013-03-08 06:58:19 UTC
Comment on attachment 238353 [details] [review]
Fix crash when setting property of type object to an incorrect type

Thank you!
Comment 5 Simon Feltman 2013-03-08 08:57:14 UTC
Attachment 238351 [details] pushed as 10214ba - Give more informative error when setting property to incorrect type
Attachment 238352 [details] pushed as 44587f4 - Remove skipping of object property tests
Attachment 238353 [details] pushed as 2656bc4 - Fix crash when setting property of type object to an incorrect type