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 306095 - In pygtk 2.6.x calling free() on GtkIconInfo object causes a double free or corruption error.
In pygtk 2.6.x calling free() on GtkIconInfo object causes a double free or c...
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
2.5.x/2.6.x
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-01 00:28 UTC by Ken Hayber
Modified: 2005-07-30 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ken Hayber 2005-06-01 00:28:06 UTC
Version details: python 2.3.5, pygtk 2.6.1, gtk 2.6.7
Distribution/Version: gentoo x86 2005

python code showing the problem:

>>>import gtk
>>>theme = gtk.icon_theme_get_default()
>>>info = theme.lookup_icon('mime-text', 48, 0)  #could be any icon
>>>info.free()
>>>info.free() #causes double free error and python aborts.

In practice, a single call to free() will cause the problem because at some
point python will free the info object itself.
Comment 1 John Finlay 2005-06-01 06:06:41 UTC
Seems like the free() method is not needed and should not be used. This likely
applies to other boxed types as well e.g. IconSource.
Comment 2 Gustavo Carneiro 2005-07-30 15:07:04 UTC
fixed in cvs:

	* gtk/gtk.override (_wrap_gtk_icon_source_free)
	(_wrap_gtk_requisition_free, _wrap_gtk_tree_iter_free)
	(_wrap_gtk_tree_row_reference_free, _wrap_gtk_border_free):
	Override free() methods of boxed types to make them do nothing and
	issue a deprecation warning.
	Fixes Bug 306095: In pygtk 2.6.x calling free() on GtkIconInfo
	                  object causes a double free or corruption error.