Changeset 5941734 in subsurface


Ignore:
Timestamp:
Mar 24, 2017, 9:27:23 AM (9 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
6c22585
Parents:
ed3f5a62
git-author:
Jan Mulder <jlmulder@…> (03/24/17 02:14:56)
git-committer:
Dirk Hohndel <dirk@…> (03/24/17 09:27:23)
Message:

mobile: the infamous enumerate problem

This fix seems to fix the enumerate problem: the problem that on a
seemingly non-determinstic way, all the profiles get enumerated
and rendered, causing freeze of the app, or even crash due
to out of memory.

Only 3 lines of code change, but this fix did not come easy. The
enumerate problem seems some kind of race condition between QML,
Kiragami and most definitely, the Subsurface QML code itself.
The breakthrough in my debugging was the setting of
highlightRangeMode: ListView?.StrictlyEnforceRange? based on
the QML documentation on snapMode: enumeration.

This fix deserves proper testing in multiple environments. As
could be seen on the developpers mailing list, I was (easily)
able to reproduce the enumerate problem, but Rick was not. So
I definitely do not claim to understand why this fix solves
the issue for me.

And as a sidenote: fixes #263 for me as well.

Signed-off-by: Jan Mulder <jlmulder@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qml/DiveDetails.qml

    r220d255 r5941734  
    172172        }
    173173
    174         onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
     174        //onWidthChanged: diveDetailsListView.positionViewAtIndex(diveDetailsListView.currentIndex, ListView.Beginning);
    175175
    176176        Item {
     
    190190                                focus: true
    191191                                clip: false
    192                                 cacheBuffer: parent.width * 3 // cache one item on either side (this is in pixels)
     192                                //cacheBuffer: parent.width * 3 // cache one item on either side (this is in pixels)
    193193                                snapMode: ListView.SnapOneItem
     194                                highlightRangeMode: ListView.StrictlyEnforceRange
    194195                                onMovementEnded: {
    195196                                        currentIndex = indexAt(contentX+1, 1);
Note: See TracChangeset for help on using the changeset viewer.