-
Bug
-
Resolution: Fixed
-
P2
-
jfx20, jfx17
-
b13
-
aarch64
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8300665 | jfx19.0.2.1 | Johan Vos | P2 | Resolved | Fixed | b01 |
JDK-8301790 | jfx17.0.7 | Kevin Rushforth | P2 | Resolved | Fixed | |
JDK-8302361 | 8u381 | Kevin Rushforth | P2 | Closed | Fixed | b01 |
JDK-8301791 | jfx11.0.19 | Kevin Rushforth | P2 | Resolved | Fixed | b01 |
macOS 13.0 / Apple M1
Java 17.0.6+1
A DESCRIPTION OF THE PROBLEM :
JavaFX app (simple Hello) crashes on startup when built with JDK17u on Xcode 14.1 (sdk13.0).
Xcode 14.1 is required for Mac ports and homebrew binary builds for macOS Ventura.
Tried the following combinations.
* JavaFX(sdk13.0, minos11.0) + JDK 17.0.5+8(sdk12.3, minos11.0) -- no problem
* JavaFX(sdk13.0, minos11.0) + JDK 17.0.6+1(sdk13.0, minos11.0) -- process crash
Confirmed on aarch64 only, not sure if this can be reproduced on x86_64.
I have identified the cause of this problem and will provide a fix code (see Workaround section). I have signed the OCA.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* Build JDK17u with Xcode 14.1.
* Launch the test app.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Test app launches normally.
ACTUAL -
Test apps do not launch and process crashes.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class HelloTest extends Application{
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane root = new BorderPane();
primaryStage.setScene(new Scene(root, 400, 400));
primaryStage.show();
}
public static void main(String arg[]) {
Application.launch(arg);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
diff --git a/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m b/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m
index 41fc4c7c4f..48bfa1b648 100644
--- a/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m
+++ b/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m
@@ -262,8 +262,9 @@ - (void)setFrameSize:(NSSize)newSize
GET_MAIN_JENV;
(*env)->CallVoidMethod(env, self->jView, jViewNotifyResize, (int)newSize.width, (int)newSize.height);
GLASS_CHECK_EXCEPTION(env);
-
- [self->nsView removeTrackingRect:self->trackingRect];
+ if (self->trackingRect) {
+ [self->nsView removeTrackingRect:self->trackingRect];
+ }
self->trackingRect = [self->nsView addTrackingRect:[self->nsView bounds] owner:self->nsView userData:nil assumeInside:NO];
}
@@ -276,14 +277,18 @@ - (void)setFrame:(NSRect)frameRect
GET_MAIN_JENV;
(*env)->CallVoidMethod(env, self->jView, jViewNotifyResize, (int)frameRect.size.width, (int)frameRect.size.height);
GLASS_CHECK_EXCEPTION(env);
+ if (self->trackingRect) {
+ [self->nsView removeTrackingRect:self->trackingRect];
+ }
- [self->nsView removeTrackingRect:self->trackingRect];
self->trackingRect = [self->nsView addTrackingRect:[self->nsView bounds] owner:self->nsView userData:nil assumeInside:NO];
}
- (void)updateTrackingAreas
{
- [self->nsView removeTrackingRect:self->trackingRect];
+ if (self->trackingRect) {
+ [self->nsView removeTrackingRect:self->trackingRect];
+ }
self->trackingRect = [self->nsView addTrackingRect:[self->nsView bounds] owner:self->nsView userData:nil assumeInside:NO];
}
FREQUENCY : always
- backported by
-
JDK-8300665 [macos] Crash when launching JavaFX app with JDK that targets SDK 13
- Resolved
-
JDK-8301790 [macos] Crash when launching JavaFX app with JDK that targets SDK 13
- Resolved
-
JDK-8301791 [macos] Crash when launching JavaFX app with JDK that targets SDK 13
- Resolved
-
JDK-8302361 [macos] Crash when launching JavaFX app with JDK that targets SDK 13
- Closed
- duplicates
-
JDK-8297131 Glass bug causes assertion failure when process targets Ventura SDK
- Closed
-
JDK-8329016 JavaFX app crashes JVM on javafx.stage.Stage.show()
- Closed
-
JDK-8339310 [macos] When launching a JavaFX application from intelliJ, the JavaFx app crashes
- Closed
-
JDK-8307925 [macos]Crash when launching JavaFX app with JDK that targets SDK 13
- Closed
- relates to
-
JDK-8295779 Xcode 14.0 fails to build jdk on m1 macos
- In Progress
-
JDK-8299159 [macos] HIToolbox assertion error output on macOS 13 Ventura
- Closed
-
JDK-8339310 [macos] When launching a JavaFX application from intelliJ, the JavaFx app crashes
- Closed
- links to
-
Commit openjdk/jfx11u/59fa5322
-
Commit openjdk/jfx17u/a1c4d0a5
-
Commit openjdk/jfx/5b96d348
-
Commit openjdk/jfx/795ed10e
-
Review openjdk/jfx11u/128
-
Review openjdk/jfx17u/109
-
Review openjdk/jfx/981
-
Review openjdk/jfx/1003