MacAccessible substring bug?
Andy Goryachev
andy.goryachev at oracle.com
Wed Oct 15 20:02:51 UTC 2025
I wonder if menu's mnemonic parsing is involved. Would it be possible to capture a screenshot of your application when this happens?
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Cormac Redmond <credmond at certak.com>
Date: Wednesday, October 15, 2025 at 12:52
To: OpenJFX <openjfx-dev at openjdk.org>
Subject: MacAccessible substring bug?
Hi,
I have an application which a user is reporting as unusable. The below happens, repeatedly (sent to me by the user). After calling Dialog.showAndWait, MacAccessible is trying to use String.substring() illegally (JFX 25).
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)
at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source)
at java.base/java.lang.String.substring(Unknown Source)
at javafx.graphics at 25-internal/com.sun.glass.ui.mac.MacAccessible.accessibilityAttributeValueForParameter(Unknown Source)
at javafx.graphics at 25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native Method)
at javafx.graphics at 25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(Unknown Source)
at javafx.graphics at 25-internal/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown Source)
at javafx.graphics at 25-internal/com.sun.glass.ui.EventLoop.enter(Unknown Source)
at javafx.graphics at 25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown Source)
at javafx.graphics at 25-internal/javafx.stage.Stage.showAndWait(Unknown Source)
at javafx.controls at 25-internal/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source)
at javafx.controls at 25-internal/javafx.scene.control.Dialog.showAndWait(Unknown Source)
<...SNIPPED...>
It seems a lot like this (unfixed) issue here: https://bugs.openjdk.org/browse/JDK-8235989, except the fallout isn't trivial in my application's case (though, I'm not sure how the error manifests itself to the user). I cannot reproduce the issue myself.
Is this a bug and can/should this be fixed?
Kind Regards,
Cormac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251015/3bf001c0/attachment.htm>
More information about the openjfx-dev
mailing list