on xenial help sign in
Hotfix around unloading WebView in wizard on first boot, which seems to cause a freeze due to oxide memory corruption, we think
commit29849b86f282f851d65e12b76817451b4b35b0e9 authorMichael Terry <michael.terry@canonical.com> dateFri 18 Mar 2016, 13:10 (11 years ago) parent620e839
2 files changed+24−4
qml/Wizard/Pages/75-report-check.qml+13−2 qml/Wizard/Wizard.qml+11−2
qml/Wizard/Pages/75-report-check.qml+13−2
@@ -63,18 +63,29 @@ LocalComponents.Page {
6363 onLinkActivated: {
6464 webview.url = "http://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
6565 webview.visible = true;
66+ webview.active = true;
6667 }
6768 }
6869
69− WebView {
70+ // FIXME: we use a loader, because we're seeing freezes in unity8 after
71+ // wizard shuts down, seemingly due to oxide? So for now, as a hotfix,
72+ // we only load the webview when necessary.
73+ // Also see Wizard.qml, where we avoid unloading the wizard at all for
74+ // similar mitigation reasons while we root-cause the problem.
75+ Loader {
7076 id: webview
71− objectName: "webview"
7277 anchors.left: parent.left
7378 anchors.right: parent.right
7479 anchors.leftMargin: -leftMargin
7580 anchors.rightMargin: -rightMargin
7681 height: parent.height
7782 visible: false
83+ active: false
84+ property string url
85+ sourceComponent: WebView {
86+ objectName: "webview"
87+ url: webview.url
88+ }
7889 }
7990 }
8091
qml/Wizard/Wizard.qml+11−2
@@ -27,7 +27,7 @@ Showable {
2727 // changing values. Having it cached as a proper Qml bool property prevents
2828 // unnecessary 'changed' emissions and provides consuming classes the
2929 // expected behavior of no emission on startup.
30− readonly property bool active: loader.active
30+ readonly property bool active: System.wizardEnabled
3131
3232 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
3333
@@ -37,11 +37,20 @@ Showable {
3737 }
3838 }
3939
40+ // FIXME: we make active state a one way road, because we're seeing freezes
41+ // in unity8 after wizard shuts down, seemingly due to oxide? So for now,
42+ // as a hotfix, just don't shut the wizard memory down.
43+ // Also see 75-report-check.qml, where we avoid unloading the wizard at all
44+ // for similar mitigation reasons while we root-cause the problem.
45+ onActiveChanged: if (active) loader.active = true
46+ Component.onCompleted: if (active) loader.active = true
47+
4048 Loader {
4149 id: loader
4250 anchors.fill: parent
43− active: System.wizardEnabled
51+ active: false
4452 source: "Pages.qml"
53+ visible: root.visible && root.active
4554
4655 Connections {
4756 target: loader.item