Leaks GVariant's in multiple places
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libdbusmenu (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Unassigned | ||
Quantal |
Won't Fix
|
High
|
Unassigned |
Bug Description
[Impact]
* Affected applications with a high number of menu updates reach the maximum value allowed for the ID of a menuitem, and rejects further menu changes. Because the application underneath the menu has already removed the underlying actual GtkMenuItem objects, it is impossible to activate the items -- to effect the actions linked to the menuitems.
* Some indicators have a relatively high and climbing memory usage due to the way they build menus to be displayed in the panel.
[Test Case]
* Run nm-applet for a while (multiple days without shutdown, without killing the application), notice whether the menus are still usable.
* Run indicators for a while, observe memory usage.
[Regression Potential]
Indicators with a very high amount of updates may be affected as circling back past the maximum value, if a new menu item is created with an ID still in use by a menuitem that has not been removed yet, neither or only one of the two menu items might be available to be clicked -- this could confuse users or cause error messages to be displayed.
Risk is low however since network-
[Other Info]
Dbusmenu seems to assume in multiple places that g_variant_parse() returns a floating reference. It doesn't, so these GVariant's are leaked.
It does things like:
g_variant_
GVariant *variant = g_variant_
g_variant_
...
g_variant_
Both of these cases result in a leak
Related branches
- Ted Gould (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 88 lines (+14/-5)2 files modifiedlibdbusmenu-glib/menuitem.c (+3/-1)
libdbusmenu-glib/server.c (+11/-4)
Changed in libdbusmenu (Ubuntu): | |
importance: | Undecided → High |
status: | New → In Progress |
description: | updated |
Changed in libdbusmenu (Ubuntu Precise): | |
status: | New → Triaged |
Changed in libdbusmenu (Ubuntu Quantal): | |
status: | New → Triaged |
Changed in libdbusmenu (Ubuntu Precise): | |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in libdbusmenu (Ubuntu Quantal): | |
importance: | Undecided → High |
This bug was fixed in the package libdbusmenu - 12.10.2-0ubuntu2
---------------
libdbusmenu (12.10.2-0ubuntu2) raring; urgency=low
* Backport trunk fixes from Mathieu Trudel-Lapierre and Chris Coulson
- r438 "Remove uses of g_type_init" (lp: #1102471) for current glib
- r439 "Fix a memory leak" (lp: #1103050)
- r440 "Fix multiple leaks due to improper use of g_variant_parse()"
(lp: #1104136)"
-- Sebastien Bacher <email address hidden> Wed, 30 Jan 2013 12:10:31 +0100