Merge lp:~gero-bare/switchboard/bug-1528361 into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Gero.Bare
Status: Merged
Approved by: Felipe Escoto
Approved revision: 612
Merged at revision: 612
Proposed branch: lp:~gero-bare/switchboard/bug-1528361
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 40 lines (+19/-9)
1 file modified
src/Switchboard.vala (+19/-9)
To merge this branch: bzr merge lp:~gero-bare/switchboard/bug-1528361
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+291429@code.launchpad.net

Commit message

Lower Idle.add priority in SwitchboardApp.load_plug due to a timing issue

Description of the change

Lower Idle.add priority in SwitchboardApp.load_plug due a timing issue.

Apparently the app crash due a pthreaad mutex.
This more an workaround than a proper fix, which would be reduce the
work of the function inside of the Idle.add
and limit it only to the critical section. (what it needs, no more no less).

In the other hand this should be fine, but at expense of the speed of the plug display. :(

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

While I can confirm this solution works, I'd prefer to have a solution that doesn't show the home screen for a second. That's a bit janky. I think in order to award the bounty it should be for the proper fix instead of a workaround.

Revision history for this message
Danielle Foré (danrabbit) wrote :

As much as I want to insulate switchboard from a potential crash, this seems to add a pause to every pane, regardless of whether or not it is needed. So all the native plugs no longer load directly to the page.

review: Needs Fixing
Revision history for this message
Gero.Bare (gero-bare) wrote :

I tried but this is as far I can go on switchboard side.

I hope this can be fixed in the plug side (gcc specifically). But that is beyond my knowledge.

Thanks for the review.

Revision history for this message
Danielle Foré (danrabbit) wrote :

This seems to work without causing any regression, but Felipe would like to try something else before we merge. So, giving him just a bit of time :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Switchboard.vala'
2--- src/Switchboard.vala 2016-02-07 16:08:57 +0000
3+++ src/Switchboard.vala 2016-04-10 19:59:39 +0000
4@@ -197,17 +197,27 @@
5 });
6
7 previous_plugs.add (plug);
8-
9- // Launch plug's executable
10- navigation_button.set_sensitive (true);
11- navigation_button.set_text (all_settings_label);
12- navigation_button.show ();
13- headerbar.title = plug.display_name;
14- current_plug = plug;
15+ return false;
16+ });
17+
18+ // Launch plug's executable
19+ navigation_button.set_sensitive (true);
20+ navigation_button.set_text (all_settings_label);
21+ navigation_button.show ();
22+ headerbar.title = plug.display_name;
23+ current_plug = plug;
24+
25+ //FIXME lower priority for gcc plugs due crash bug #1528361
26+ var priority = GLib.Priority.DEFAULT_IDLE;
27+ if (plug.code_name.contains ("-gcc-")) {
28+ priority = GLib.Priority.LOW;
29+ }
30+
31+ Idle.add (()=> {
32 switch_to_plug (plug);
33-
34 return false;
35- });
36+ }, priority);
37+
38 }
39
40 #if HAVE_UNITY

Subscribers

People subscribed via source and target branches

to all changes: