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 <[email protected]> on behalf of Cormac Redmond 
<[email protected]>
Date: Wednesday, October 15, 2025 at 12:52
To: OpenJFX <[email protected]>
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@25-internal/com.sun.glass.ui.mac.MacAccessible.accessibilityAttributeValueForParameter(Unknown
 Source)
        at 
javafx.graphics@25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native
 Method)
        at 
javafx.graphics@25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(Unknown
 Source)
        at 
javafx.graphics@25-internal/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown
 Source)
        at javafx.graphics@25-internal/com.sun.glass.ui.EventLoop.enter(Unknown 
Source)
        at 
javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown
 Source)
        at javafx.graphics@25-internal/javafx.stage.Stage.showAndWait(Unknown 
Source)
        at 
javafx.controls@25-internal/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown
 Source)
        at 
javafx.controls@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

Reply via email to