<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I wonder if menu's mnemonic parsing is involved.  Would it be possible to capture a screenshot of your application when this happens?</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div dir="ltr" style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Cormac Redmond <credmond@certak.com><br>
<b>Date: </b>Wednesday, October 15, 2025 at 12:52<br>
<b>To: </b>OpenJFX <openjfx-dev@openjdk.org><br>
<b>Subject: </b>MacAccessible substring bug?<br>
<br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">Hi,</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">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).</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: monospace;">java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1<br>
        at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)<br>
        at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)<br>
        at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source)<br>
        at java.base/java.lang.String.substring(Unknown Source)<br>
        at javafx.graphics@25-internal/com.sun.glass.ui.mac.MacAccessible.accessibilityAttributeValueForParameter(Unknown Source)<br>
        at javafx.graphics@25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native Method)<br>
        at javafx.graphics@25-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(Unknown Source)<br>
        at javafx.graphics@25-internal/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown Source)<br>
        at javafx.graphics@25-internal/com.sun.glass.ui.EventLoop.enter(Unknown Source)<br>
        at javafx.graphics@25-internal/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown Source)<br>
        at javafx.graphics@25-internal/javafx.stage.Stage.showAndWait(Unknown Source)<br>
        at javafx.controls@25-internal/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source)<br>
        at javafx.controls@25-internal/javafx.scene.control.Dialog.showAndWait(Unknown Source)</div>
<div dir="ltr" class="gmail_default" style="font-family: monospace;">        <...SNIPPED...></div>
<div dir="ltr" class="gmail_default" style="font-family: monospace;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">It seems a lot like this (unfixed) issue here:
<a href="https://bugs.openjdk.org/browse/JDK-8235989" data-outlook-id="d587681b-9d53-4796-b1f2-8ed0f2c8649e">
https://bugs.openjdk.org/browse/JDK-8235989</a>, 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.</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">Is this a bug and can/should this be fixed? </div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;"><br>
</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">Kind Regards,</div>
<div dir="ltr" class="gmail_default" style="font-family: verdana, sans-serif;">Cormac</div>
</div>
</body>
</html>