- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P2                     
     - 
    Affects Version/s: jfx11, 8, jfx17
 - 
    Component/s: javafx
 - 
    Environment:
MacOS 12 beta (Monterey)
ProductName: macOS
ProductVersion: 12.0.1
BuildVersion: 21A558 
- 
        os_x
 
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8276726 | jfx17.0.2 | Kevin Rushforth | P2 | Resolved | Fixed | |
| JDK-8276728 | 8u331 | Kevin Rushforth | P2 | Resolved | Fixed | b01 | 
| JDK-8276823 | 8u321 | Kevin Rushforth | P2 | Closed | Fixed | b04 | 
| JDK-8276886 | 8u311 | Kevin Rushforth | P2 | Closed | Fixed | b32 | 
| JDK-8276741 | jfx11.0.14 | Kevin Rushforth | P2 | Resolved | Fixed | 
The relevant stacktrace for this is:
V [libjvm.dylib] _Z12report_fatalPKciS0_z+0xb5
V [libjvm.dylib] _ZN20SafepointSynchronize5blockEP10JavaThread+0x1d1
V [libjvm.dylib] _ZN10JavaThread44check_safepoint_and_suspend_for_native_transEPS_+0xab
V [libjvm.dylib] _ZN20ThreadInVMfromNativeC1EP10JavaThread+0x6d
V [libjvm.dylib] jni_DeleteGlobalRef+0x3e
C [libglass.dylib] -[GlassRunnable dealloc]+0x28
C [Foundation] -[_NSThreadPerformInfo dealloc]+0x2a
The final crash is triggered by an assert in safepoint.cpp in SafepointSynchronize::block(JavaThread *thread) where the passed thread is in status 4 (_thread_in_native) where it should be in _thread_in_native_trans probably.
The trace originates from glass, where the `dealloc` invocation on GlassRunnable calls `jni_DeleteGlobalRef` and enters the VM.
At this point, I'm not sure if this is an issue in JavaFX (glass on Mac) or in hotspot.
- backported by
 - 
                    
JDK-8276726 Crash on macOS 12 in GlassRunnable::dealloc
-         
     - Resolved
 
 -         
 - 
                    
JDK-8276728 Crash on macOS 12 in GlassRunnable::dealloc
-         
     - Resolved
 
 -         
 - 
                    
JDK-8276741 Crash on macOS 12 in GlassRunnable::dealloc
-         
     - Resolved
 
 -         
 - 
                    
JDK-8276823 Crash on macOS 12 in GlassRunnable::dealloc
-         
     - Closed
 
 -         
 - 
                    
JDK-8276886 Crash on macOS 12 in GlassRunnable::dealloc
-         
     - Closed
 
 -         
 
- duplicates
 - 
                    
JDK-8299321 Crash after display the window with # Problematic frame: # v ~StubRoutines::SafeFetchN
-         
     - Closed
 
 -         
 
- relates to
 - 
                    
JDK-8276915 Crash on iOS 15.1 in GlassRunnable::dealloc
-         
     - Resolved
 
 -         
 
- links to
 - 
                    
        
        Commit
        openjdk/jfx11u/5f9d9730
    
 - 
                    
        
        Commit
        openjdk/jfx17u/be5793ea
    
 - 
                    
        
        Commit
        openjdk/jfx/4d8e12d2
    
 - 
                    
        
        Review
        openjdk/jfx11u/59
    
 - 
                    
        
        Review
        openjdk/jfx17u/18
    
 - 
                    
        
        Review
        openjdk/jfx/661