Merge lp:~gordallott/unity/fix-music-lens-causing-crashers into lp:unity

Proposed by Gord Allott
Status: Merged
Merged at revision: 1611
Proposed branch: lp:~gordallott/unity/fix-music-lens-causing-crashers
Merge into: lp:unity
Diff against target: 26 lines (+3/-2)
2 files modified
plugins/unityshell/src/IconLoader.cpp (+2/-1)
plugins/unityshell/src/ResultRendererTile.cpp (+1/-1)
To merge this branch: bzr merge lp:~gordallott/unity/fix-music-lens-causing-crashers
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+76761@code.launchpad.net

Description of the change

this should fix the music lens bug, what seems to have been happening is that tim added some code that resets the handle_counter_ in the IconLoader, but it was watching the wrong container to know when to reset the handle_counter_, which caused handles to get overridden, which caused the wrong slot to get disconnected when we call disconnectbyhandle in ResultRenderer

and figuring that out has stolen some of my soul.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I can confirm that Unity no longer crashes (even with the slow-icon-loading-patch). Codewise I think it looks ok, but I also think we may need a second opinion as I don't feel I grok this 100%

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/IconLoader.cpp'
2--- plugins/unityshell/src/IconLoader.cpp 2011-09-14 09:58:44 +0000
3+++ plugins/unityshell/src/IconLoader.cpp 2011-09-23 15:12:36 +0000
4@@ -479,7 +479,8 @@
5 if (queue_empty)
6 {
7 idle_id_ = 0;
8- handle_counter_ = 0;
9+ if (task_map_.empty())
10+ handle_counter_ = 0;
11 }
12
13 return !queue_empty;
14
15=== modified file 'plugins/unityshell/src/ResultRendererTile.cpp'
16--- plugins/unityshell/src/ResultRendererTile.cpp 2011-09-21 11:25:04 +0000
17+++ plugins/unityshell/src/ResultRendererTile.cpp 2011-09-23 15:12:36 +0000
18@@ -343,7 +343,7 @@
19 if (container)
20 container->slot_handle = 0;
21 }
22- else
23+ else if (container)
24 {
25 // we need to load a missing icon
26 IconLoader::IconLoaderCallback slot = sigc::bind(sigc::mem_fun(this, &ResultRendererTile::IconLoaded), icon_name, row);