Bug 377037 - PageRow: pushing to pageStack produces TypeError (Cannot write property of null).
Summary: PageRow: pushing to pageStack produces TypeError (Cannot write property of nu...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Debian unstable Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 22:19 UTC by jm.ouwerkerk
Modified: 2017-04-11 19:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
QML example demonstrating the issue (685 bytes, text/x-qml)
2017-02-28 22:19 UTC, jm.ouwerkerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jm.ouwerkerk 2017-02-28 22:19:02 UTC
Created attachment 104279 [details]
QML example demonstrating the issue

It is possible to provoke the Kirigami PageRow component into attempting to deref a null value by pushing a new page to the pageStack.

Steps to Reproduce:

 1. Load the attached QML file with qmlscene
 2. Click the "Demonstrate the bug" button 3 times or more (it doesn't need 'rapid' clicks, just repeated clicks to trigger the bug).
 3. Observe the console output of qmlscene: on or more TypeErrors should be reported, the first of which references line 436 of the PageRow source.

Burried inside the PageRow component, at lines 436 the following is attempted:

```
    // at line 435:
    onPageChanged: {
        page.parent = container;
        page.anchors.fill = container;
    }
```
Comment 1 jm.ouwerkerk 2017-02-28 23:18:59 UTC
Qt version: 5.7.1
Comment 2 Marco Martin 2017-04-11 19:28:23 UTC
Git commit 2fb69458af1e4e76cbff68f11f18457ff13bca75 by Marco Martin.
Committed on 11/04/2017 at 19:28.
Pushed by mart into branch 'master'.

don't re-push pages already in

if a page is contained in the pagerow, never re-push it again

M  +19   -0    src/controls/PageRow.qml

https://commits.kde.org/kirigami/2fb69458af1e4e76cbff68f11f18457ff13bca75