← Back to team overview

ubuntu-phone team mailing list archive

Re: Page sections and corrupted stacks

 

On Tue, Apr 14, 2015 at 8:38 AM, Tim Peeters <tim.peeters@xxxxxxxxxxxxx> wrote:
From the fix you proposed, it appears that selectedIndex (and sort) property is undefined some times. Are you using the value of that property somewhere in C++?

The selectedIndex is -1 when there are no sections. My trick with Math.max ensures that sort is 0 (where it would start off anyway) in this case. Judging by the (lack of) calls to onSortChanged, my code is going down the same paths with and without the fix.

The sort property is not used in any compiled code. It will affect the order some compiled code runs in, but rather trivially. I have a C++ function to check whether a file exists on the filesystem. As sort changes, the order in which files are checked will change.

A simpler test program to reproduce the issue would be very helpful. [...] It is difficult to tell where the bug is, but if it appears to come from UITK, can you report it as a bug here https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit so we can report future findings about the cause there also?

I haven't managed to build a minimal test case yet. I think the only way to do this will be to tear parts out of my existing code until the problem goes away. But this can be touchy, as you probably know, since you can introduce other errors in the process. If I managed to get a handle on this, I'll report a bug.

Thanks,
Robert





Follow ups

References