Merge lp:~brandontschaefer/unity/possible-crash--fixes into lp:unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2332
Proposed branch: lp:~brandontschaefer/unity/possible-crash--fixes
Merge into: lp:unity
Diff against target: 19 lines (+7/-1)
1 file modified
plugins/unityshell/src/unityshell.cpp (+7/-1)
To merge this branch: bzr merge lp:~brandontschaefer/unity/possible-crash--fixes
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+103224@code.launchpad.net

Commit message

UnityScreen: destroy the controllers before the window thread

Fixes crashes enabling/disabling plugins in CCSM

Description of the change

=== Problem ===
Lots of crashes in unity with ccsm and plugin

=== Fix ===
Make sure the smart ptr gets reset before the window thread is deleted.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

So im tracking down the crash that wasn't fixed by this branch. Here are the only 2 crashes now from UnityPlugin and Wobbly Windows:

Caused when enabling/disabling Unity Plugin in ccsm
bamf_matcher_on_view_opened:

normal backtrace
http://paste.ubuntu.com/943691/

full backtrace
http://paste.ubuntu.com/943693/

Caused when enabling/disabling Wobbly Windows in ccsm
bamf_matcher_on_view_closed:

normal backtrace
http://paste.ubuntu.com/943698/

full backtrace
http://paste.ubuntu.com/943697/

What happens is either OpenView is emited twice on the same window or the CloseView is called twice on the same window. It was always the same window for open, or the same for close (if you cause the crash multiple times).

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> So im tracking down the crash that wasn't fixed by this branch. Here are the
> only 2 crashes now from UnityPlugin and Wobbly Windows:
>
> Caused when enabling/disabling Unity Plugin in ccsm
> bamf_matcher_on_view_opened:
>
> normal backtrace
> http://paste.ubuntu.com/943691/
>
> full backtrace
> http://paste.ubuntu.com/943693/
>
> Caused when enabling/disabling Wobbly Windows in ccsm
> bamf_matcher_on_view_closed:
>
> normal backtrace
> http://paste.ubuntu.com/943698/
>
> full backtrace
> http://paste.ubuntu.com/943697/
>
>
> What happens is either OpenView is emited twice on the same window or the
> CloseView is called twice on the same window. It was always the same window
> for open, or the same for close (if you cause the crash multiple times).

This should be due to libbamf, that doesn't disconnect these signals on dispose, I'll look to that.

The unity side looks good to me.

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Brandon, please check if the crashes are fixed using this libbamf version: http://go.3v1n0.net/IBB74t

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Sweeet that fixed the problem! Now I don't get any crashes when enabling and disabling unity plugin.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-04-22 19:09:53 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-04-24 06:32:22 +0000
@@ -402,8 +402,14 @@
402402
403 ::unity::ui::IconRenderer::DestroyTextures();403 ::unity::ui::IconRenderer::DestroyTextures();
404 QuicklistManager::Destroy();404 QuicklistManager::Destroy();
405 // We need to delete the launchers before the window thread.405 // We need to delete the controllers before the window thread.
406 launcher_controller_.reset();406 launcher_controller_.reset();
407 hud_controller_.reset();
408 dash_controller_.reset();
409 panel_controller_.reset();
410 switcher_controller_.reset();
411 shortcut_controller_.reset();
412
407 delete wt;413 delete wt;
408 reset_glib_logging();414 reset_glib_logging();
409}415}