From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-26 21:57:26
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified Summary: Pango attribute objects leak memory Classification: Bindings Product: gnome-perl Version: unspecified OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: Pango AssignedTo: gtk...@li... ReportedBy: squ...@fr... QAContact: gtk...@li... GNOME target: --- GNOME version: --- I've only tested Pango::AttrSize and Pango::AttrWeight, but I guess it's the same for all of them. Running this : perl -e 'use Pango; Pango::AttrSize->new(10) while 1' will make memory usage grow continuously. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-26 22:57:45
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |kaf...@gm..., | |sc...@as... Ever Confirmed|0 |1 --- Comment #1 from Torsten Schoenfeld <kaf...@gm...> 2010-04-26 22:57:34 UTC --- This is due to the way the various attribute wrappers are set up. Pango::Attribute is a real boxed wrapper for a real boxed type. The others, like Pango::AttrSize, are then set up by hand to inherit from Pango::Attribute and thus from Glib::Boxed. If one of these attributes now goes out of scope, Glib::Boxed::DESTROY is called. But since Pango::AttrSize is not registered with the boxed type wrapper machinery, no C-level destroy function is called. I attach a patch for Glib which makes this issue go away, but I think this approach is very incorrect under certain circumstances. See the patch for details. muppet, what do you think? -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-26 22:58:03
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified --- Comment #2 from Torsten Schoenfeld <kaf...@gm...> 2010-04-26 22:57:47 UTC --- Created an attachment (id=159650) View: https://bugzilla.gnome.org/attachment.cgi?id=159650 Review: https://bugzilla.gnome.org/review?bug=616894&attachment=159650 Glib::Boxed::DESTROY: handle unregistered children If a class is set to inherit from Glib::Boxed but is not actually registered as a boxed type (and so has no BoxedInfo associated with it), simply use the default destroy function. This way, at least the BoxedWrapper struct gets freed. FIXME: But what about a boxed wrapper that doesn't use default_boxed_wrap? If another package is set to inherit from that boxed wrapper, Glib::Boxed::DESTROY would still call default_boxed_destroy, which would most likely result in a segfault. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-27 10:21:20
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified André Klapper <a9016009> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |memory -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-27 22:25:09
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159650|0 |1 is obsolete| | --- Comment #3 from Torsten Schoenfeld <kaf...@gm...> 2010-04-27 22:24:55 UTC --- Created an attachment (id=159729) View: https://bugzilla.gnome.org/attachment.cgi?id=159729 Review: https://bugzilla.gnome.org/review?bug=616894&attachment=159729 Don't leak Pango::Attribute objects packages as aliases for real types. Use this to register all Pango::Attribute subclasses, say Pango::AttrSize, as aliases for Pango::Attribute (i.e., PANGO_TYPE_ATTRIBUTE). This way, when Glib::Boxed::DESTROY tries to look up "Pango::AttrSize", it finds the information registered for "Pango::Attribute", including the correct memory-freeing function. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-27 22:27:34
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified --- Comment #4 from Torsten Schoenfeld <kaf...@gm...> 2010-04-27 22:27:22 UTC --- Sorry, git-bz ate the first line of my comment there. It should have read: I think I found a better fix. Glib provides the means to register packages as aliases for real types. Use this to register all Pango::Attribute subclasses, say Pango::AttrSize, as aliases for Pango::Attribute (i.e., PANGO_TYPE_ATTRIBUTE). This way, when Glib::Boxed::DESTROY tries to look up "Pango::AttrSize", it finds the information registered for "Pango::Attribute", including the correct memory-freeing function. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-05-16 11:51:48
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Torsten Schoenfeld <kaf...@gm...> 2010-05-16 11:51:34 UTC --- I committed the second patch now. Attachment 159729 pushed as f59a97e - Don't leak Pango::Attribute objects -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |
From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-05-16 11:51:53
|
https://bugzilla.gnome.org/show_bug.cgi?id=616894 gnome-perl | Pango | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159729|none |committed status| | -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |