Roger Whitcomb created PIVOT-1028:
-------------------------------------
Summary: When SuggestionPopup data changes and an item beyond the
new length was highlighted, an IndexOutOfBounds is thrown
Key: PIVOT-1028
URL: https://issues.apache.org/jira/browse/PIVOT-1028
Project: Pivot
Issue Type: Bug
Components: wtk-terra
Affects Versions: 2.0.5, 2.1
Reporter: Roger Whitcomb
Assignee: Roger Whitcomb
Fix For: 2.1
One way to reproduce is to have a long SuggestionPopup list of suggestions,
then move the mouse to a selection down in the list, so it is highlighted, then
type something in the attached TextInput so that the list is shorter, then move
the mouse out of the suggestion list: an IndexOutOfBoundsException will be
thrown with the error being the old "highlightIndex" of TerraListViewSkin being
out of range of the new list data length.
Appears to only happen if "variableItemHeight" is set true, which shouldn't be
the normal case.
Here is a (partial) stack trace:
java.lang.IndexOutOfBoundsException: Index 1 out of bounds [0,0].
STACK TRACE:
at org.apache.pivot.util.Utils.checkIndexBounds(Utils.java:224)
at org.apache.pivot.collections.ArrayList.get(ArrayList.java:347)
at
org.apache.pivot.wtk.skin.terra.TerraListViewSkin.getItemHeight(TerraListViewSkin.java:479)
at
org.apache.pivot.wtk.skin.terra.TerraListViewSkin.getItemBounds(TerraListViewSkin.java:444)
at
org.apache.pivot.wtk.skin.terra.TerraListViewSkin.mouseOut(TerraListViewSkin.java:789)
at
org.apache.pivot.wtk.ComponentMouseListener$Listeners.lambda$mouseOut$2(ComponentMouseListener.java:48)
at java.lang.Iterable.forEach(Iterable.java:75)
at
org.apache.pivot.wtk.ComponentMouseListener$Listeners.mouseOut(ComponentMouseListener.java:48)
at org.apache.pivot.wtk.Component.mouseOut(Component.java:2466)
at org.apache.pivot.wtk.Container.mouseOut(Container.java:630)
at org.apache.pivot.wtk.Container.mouseOut(Container.java:630)
at org.apache.pivot.wtk.Container.mouseOut(Container.java:630)
at org.apache.pivot.wtk.Container.mouseMove(Container.java:591)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseMotionEvent(ApplicationContext.java:1247)
at java.awt.Component.processEvent(Component.java:6302)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:945)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)