Spotted in our nightly headful test run on both Ubuntu 20.04 and Ubuntu 22.04:
RTLTextFlowCharacterIndexTest > testTextAndTextFlowHitInfoForRTLMultipleMultiLineEnglishArabicTextNodes() FAILED
org.opentest4j.AssertionFailedError: expected: <0> but was: <-1>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:527)
at app//test.robot.javafx.scene.RTLTextFlowCharacterIndexTest.testTextAndTextFlowHitInfoForRTLMultipleMultiLineEnglishArabicTextNodes(RTLTextFlowCharacterIndexTest.java:306)
In addition, the following exception was logged on one of the two systems:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: offset is out of bounds: -1
at java.base/sun.util.locale.provider.BreakIteratorProviderImpl$GraphemeBreakIterator.following(BreakIteratorProviderImpl.java:255)
at javafx.graphics@23-ea/com.sun.javafx.text.PrismTextLayout.getHitInfo(PrismTextLayout.java:462)
at javafx.graphics@23-ea/javafx.scene.text.Text.hitTest(Text.java:1038)
at test.robot.javafx.scene.RTLTextFlowCharacterIndexTest.handleMouseEvent(RTLTextFlowCharacterIndexTest.java:387)
at javafx.base@23-ea/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@23-ea/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@23-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at javafx.base@23-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at javafx.base@23-ea/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@23-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@23-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@23-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base@23-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@23-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base@23-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@23-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base@23-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@23-ea/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@23-ea/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@23-ea/javafx.event.Event.fireEvent(Event.java:199)
at javafx.graphics@23-ea/javafx.scene.Scene$MouseHandler.process(Scene.java:3987)
at javafx.graphics@23-ea/javafx.scene.Scene.processMouseEvent(Scene.java:1893)
at javafx.graphics@23-ea/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2711)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
at javafx.graphics@23-ea/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
at javafx.graphics@23-ea/com.sun.glass.ui.View.notifyMouse(View.java:937)
at javafx.graphics@23-ea/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at javafx.graphics@23-ea/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(GtkApplication.java:264)
at java.base/java.lang.Thread.run(Thread.java:1583)