Thank you, John! I've added a video clip for the convenience.
-andy From: John Hendrikx <john.hendr...@gmail.com> Date: Wednesday, July 12, 2023 at 17:44 To: Andy Goryachev <andy.goryac...@oracle.com>, Ajit Ghaisas <ajit.ghai...@oracle.com> Cc: openjfx-dev@openjdk.org <openjfx-dev@openjdk.org> Subject: Re: [External] : Re: ListView with ImageViews for cells very bugged? I've managed to reproduce it -- it seems it may be a regression, or it is exposing a new bug after a fix done to the scrollbar (in 19.0.2.1 I can't reproduce it, but I also can't fully click the scrollbar back up). In 21-ea-24 I can reproduce it by scrolling all the way down, then trying to "click" it back up not using the scrollbar thumb. I created this ticket to track the issue: https://bugs.openjdk.org/browse/JDK-8311983 --John On 12/07/2023 18:37, Andy Goryachev wrote: I have a video clip of how to reproduce the exception. Do you mind creating a bug? Thank you -andy From: John Hendrikx <john.hendr...@gmail.com><mailto:john.hendr...@gmail.com> Date: Wednesday, July 12, 2023 at 09:33 To: Andy Goryachev <andy.goryac...@oracle.com><mailto:andy.goryac...@oracle.com>, Ajit Ghaisas <ajit.ghai...@oracle.com><mailto:ajit.ghai...@oracle.com> Cc: openjfx-dev@openjdk.org<mailto:openjfx-dev@openjdk.org> <openjfx-dev@openjdk.org><mailto:openjfx-dev@openjdk.org> Subject: Re: [External] : Re: ListView with ImageViews for cells very bugged? I'm unable to get this one myself, but the trace can hopefully point us to the problem. I also find that the behavior of the Horizontal scrollbar leaves a lot to be desired. Clicking in the empty area should shift it by a full view width, but it only shifts by like 16 pixels orso. So there are some bugs, but at least not quite as severe as I thought. --John On 12/07/2023 18:28, Andy Goryachev wrote: ... and just by randomly clicking on the scrollbar I got this: Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 2 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:359) at java.base/java.util.ArrayList.get(ArrayList.java:427) at javafx.controls/javafx.scene.control.skin.VirtualFlow.updateCellSize(VirtualFlow.java:3099) at javafx.controls/javafx.scene.control.skin.VirtualFlow.positionCell(VirtualFlow.java:1975) at javafx.controls/javafx.scene.control.skin.VirtualFlow.scrollPixels(VirtualFlow.java:1650) at javafx.controls/javafx.scene.control.skin.VirtualFlow.tryScrollOneCell(VirtualFlow.java:1565) at javafx.controls/javafx.scene.control.skin.VirtualFlow.scrollTo(VirtualFlow.java:1536) at javafx.controls/com.sun.javafx.scene.control.VirtualScrollBar.adjustValue(VirtualScrollBar.java:142) at javafx.controls/com.sun.javafx.scene.control.behavior.ScrollBarBehavior.lambda$20(ScrollBarBehavior.java:162) at javafx.controls/com.sun.javafx.scene.control.behavior.ScrollBarBehavior.trackPress(ScrollBarBehavior.java:173) at javafx.controls/javafx.scene.control.skin.ScrollBarSkin.lambda$7(ScrollBarSkin.java:411) at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.controls/javafx.scene.control.skin.VirtualFlow.lambda$2(VirtualFlow.java:369) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.base/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3984) at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1890) at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2708) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:1) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$2(GlassViewEventHandler.java:450) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:551) at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:937) at javafx.graphics/com.sun.glass.ui.mac.MacView.notifyMouse(MacView.java:127) -andy From: John Hendrikx <john.hendr...@gmail.com><mailto:john.hendr...@gmail.com> Date: Wednesday, July 12, 2023 at 09:25 To: Ajit Ghaisas <ajit.ghai...@oracle.com><mailto:ajit.ghai...@oracle.com> Cc: openjfx-dev@openjdk.org<mailto:openjfx-dev@openjdk.org> <openjfx-dev@openjdk.org><mailto:openjfx-dev@openjdk.org>, Andy Goryachev <andy.goryac...@oracle.com><mailto:andy.goryac...@oracle.com> Subject: [External] : Re: ListView with ImageViews for cells very bugged? Hi Ajit, Thanks for checking, that is indeed a bit of a beginner mistake there... sorry for that. I added the line, and it is much improved (luckily), but I still see issues 2 and 3. I can narrow down 2 a bit. When there is only space to show a single row (or less than a single line), the scrollbar won't respond to clicks in the empty area. When at least a full row is visible, then it starts working normally. I wonder if it might be possible to warn if that line is missing somehow, or provide a different method to override that doesn't require calling super. On 12/07/2023 11:26, Ajit Ghaisas wrote: Hi John, This looks like a user code issue and not a JavaFX bug. Most of the vertical scrollbar issues that you have mentioned get fixed by adding a call to "super.updateItem(image, empty);" as a first call in the cell factory method "protected void updateItem(Image image, boolean empty)” I am seeing an exception when I scroll fully down and then scroll up by clicking empty area on the vertical scrollbar. This looks like a separate issue though. I didn't see any exceptions, just that the scrollbar is unresponsive when clicking in the empty area when less than a full row is visible. --John