JDK-8340442 : Enable SwingNodePlatformExitCrashTest after JDK-8340849 is fixed
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: jfx24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-19
  • Updated: 2024-11-16
  • Resolved: 2024-10-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx24 b16Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
I recently fixed JDK-8339178, which is the FX equivalent of AWT bug JDK-8190329. As part of that, I added new tests. I recently discovered that there was already a system test created for that bug, SwingNodePlatformExitCrashTest, which is skipped pending the fix for JDK-8190329. Since the crash is now fixed, we should re-enable the skipped test, after verifying that it now works correctly.
Comments
Changeset: 501f761c Branch: master Author: Prasanta Sadhukhan <psadhukhan@openjdk.org> Date: 2024-10-30 13:44:28 +0000 URL: https://git.openjdk.org/jfx/commit/501f761c388642c73ce210fb199806eeeda73e54
30-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1614 Date: 2024-10-28 15:01:20 +0000
29-10-2024

It still crashes, but with a different root cause. This particular test, SwingNodePlatformExitCrashTest, was (and still is) crashing due to an unrelated problem than the one tracked by AWT bug JDK-8190329 (and FX equivalent JDK-8339178). In reality, there were two separate crashes with two separate, but similar, scenarios. * FX toolkit is started first, and thus JavaFX owns the NSApplication: The crash reported in JDK-8190329 (and later cloned by JDK-8339178 on the FX side) only happens in this mode, where the FX toolkit is started first (e.g., if the main class extends javafx.applicationApplication). The crash was a result of shutting down the FX toolkit, which detached the AppKit thread from the JVM and thus invalidated any cached JNI env pointers, and then creating a Swing Dialog, which used the stale JNI env pointer. As noted, this one is now fixed in both FX and AWT. * AWT toolkit is started first, and thus AWT owns the NSApplication: This crash is also the result of shutting down the FX toolkit and then creating a Swing Dialog; based on the stack trace, it looks like this crash happens when the AWT dialog tries to create the underlying Window as a child window of the FX window, but the child window pointer is invalid. I filed JDK-8340849 against AWT to track this crash. This test case needs to remain disabled until the AWT crash is fixed, and we can be sure that we are running a JDK with that fix. In the mean time, I'll file a bug to change the bug ID we are using to skip this test (the one listed in the `@Disabled` annotation) from JDK-8190329 to JDK-8340849.
24-09-2024