You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mihai Chira (JIRA)" <ji...@apache.org> on 2014/07/03 18:20:25 UTC

[jira] [Commented] (FLEX-34119) mx.collections.HierarchicalCollectionViewCursor causes CursorError RTE from ListCollectionView when the underlying collections change

    [ https://issues.apache.org/jira/browse/FLEX-34119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051634#comment-14051634 ] 

Mihai Chira commented on FLEX-34119:
------------------------------------

[~aharui], [~jmclean] this bug has caused us and our users enough problems for us to invest in solving it in the SDK. I will start working on it in about 20 days' time. If you have any pointers, it would be very useful.

> mx.collections.HierarchicalCollectionViewCursor causes CursorError RTE from ListCollectionView when the underlying collections change
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-34119
>                 URL: https://issues.apache.org/jira/browse/FLEX-34119
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Apache Flex 4.12.1
>            Reporter: Mihai Chira
>              Labels: collections, cursors, easytest
>             Fix For: Apache Flex 4.12.0
>
>         Attachments: _HierarchicalCollectionViewCursorBug.fxp
>
>
> Run the attached AIR project. (Avoid debug mode unless you want to press F8 MANY times). It will take around 10s.
> The unit test (HierarchicalCollectionViewCursorTest.as) shows many of the ways in which HierarchicalCollectionViewCursor's state can make ListCollectionView fail through a seek() operation on ListCollectionViewCursor by allowing a CursorError to be thrown from ListCollectionView.getBookmarkIndex() (I say 'allowing' because it could easily prevent it).
> The (long) trace output shows all the configurations of the collection-view that I constructed which cause the RTE.
> Notations:
> [SEL] - the currently selected item by the HierarchicalCollectionViewCursor (cursor.current).
> [INS] - the newly inserted item, which caused the RTE
> [REPL] - the item which, when replaced, causes the RTE (notice there's only one such instance - when the (selected) second stage is replaced with another item).
> NOTES:
> * for us this has caused numerous, apparently mysterious bugs within AdvancedDataGrids which boiled down to one or other of these configurations.
> * The reproduceCursorErrorWithDisableAutoUpdate() test shows that the error can also be thrown by not allowing the HierarchicalCollectionView (and, implicitly, the HierarchicalCollectionViewCursor) to know about changes in the underlying collections (by using disableAutoUpdate() in conjunction with refresh() and enableAutoUpdate()). We were using these methods to optimise expensive updates in the collections shown in the AdvancedDataGrids, without realising they had a knock-on effect on the HierarchicalCollectionView used by the grids. This part of the error-generation scenario is controlled by the programmers, of course, but it might be worth documenting, so that others can avoid these issues.
> * I found one bug report which hints at these problems, but it doesn't seem to have kept its attachment: FLEX-33054. The last comment shows the exact part of the code which calls seek(), thus generating the RTE.



--
This message was sent by Atlassian JIRA
(v6.2#6252)