[macOS] Crash after main stage with modal dialog is moved to full screen

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: jfx11, jfx25
    • Component/s: javafx
    • None

      On macOS, run a simple application with a modal dialog, like the one attached to this issue.

      Follow these steps:
      1. Run the application ("1. application.png")
      2. Open the dialog ("2. application and dialog.png")
      3. Press Ctrl+Up, to open Mission Control ("3. Mission control.png")
      4. Select, and drag the main stage and move it to the top Spaces bar, after the existing desktops, to its own "java" space ("java space.png"), which simply will make the main stage to go fullscreen in its own space, while the dialog remains in the initial workspace/desktop.
      5. From the top Spaces bar, go to the java desktop (or without Mission Control, press Control+Right until you reach it). You will hear a beep (due to the modal dialog), and immediately the space will change back to the initial desktop with the dialog ("orphan dialog.png").
      6. Press OK to close the dialog, the app will crash.

      This is the exception:

      *** Terminating app due to uncaught exception 'NSGenericException', reason: 'NSWindowStyleMaskFullScreen cleared on a window outside of a full screen transition. Called from (
              0 AppKit 0x00000001877e25e0 __25-[NSWindow setStyleMask:]_block_invoke + 156
              1 AppKit 0x0000000186b729b0 NSPerformVisuallyAtomicChange + 108
              2 AppKit 0x00000001877e2490 -[NSWindow setStyleMask:] + 176
              3 libglass.dylib 0x00000001081106f8 Java_com_sun_glass_ui_mac_MacWindow__1setEnabled + 444
              4 ??? 0x0000000118f54500 0x0 + 4713694464
              5 ??? 0x0000000118f50950 0x0 + 4713679184
              6 ??? 0x0000000118f50950 0x0 + 4713679184
              7 ??? 0x0000000118f50950 0x0 + 4713679184
              8 ??? 0x0000000118f50950 0x0 + 4713679184
              9 ??? 0x0000000118f50ef0 0x0 + 4713680624
              10 ??? 0x0000000118f50950 0x0 + 4713679184
              11 ??? 0x0000000118f50950 0x0 + 4713679184
              12 ??? 0x0000000118f50950 0x0 + 4713679184
              13 ??? 0x0000000118f50950 0x0 + 4713679184
              14 ??? 0x0000000118f50950 0x0 + 4713679184
              15 ??? 0x0000000118f50950 0x0 + 4713679184
              16 ??? 0x0000000118f50950 0x0 + 4713679184
              17 ??? 0x0000000118f50950 0x0 + 4713679184
              18 ??? 0x0000000118f50950 0x0 + 4713679184
              19 ??? 0x0000000118f50950 0x0 + 4713679184
              20 ??? 0x0000000118f50950 0x0 + 4713679184
              21 ??? 0x0000000118f50950 0x0 + 4713679184
              22 ??? 0x0000000118f50950 0x0 + 4713679184
              23 ??? 0x0000000118f50ef0 0x0 + 4713680624
              24 ??? 0x0000000118f50950 0x0 + 4713679184
              25 ??? 0x0000000111d3f70c 0x0 + 4594071308
              26 ??? 0x0000000118f506e0 0x0 + 4713678560
              27 ??? 0x0000000111df3b34 0x0 + 4594809652
              28 ??? 0x0000000118f506e0 0x0 + 4713678560
              29 ??? 0x0000000118f506e0 0x0 + 4713678560
              30 ??? 0x0000000118f50950 0x0 + 4713679184
              31 ??? 0x0000000118f50950 0x0 + 4713679184
              32 ??? 0x0000000118f50950 0x0 + 4713679184
              33 ??? 0x0000000118f50950 0x0 + 4713679184
              34 ??? 0x0000000118f50ef0 0x0 + 4713680624
              35 ??? 0x0000000118f50950 0x0 + 4713679184
              36 ??? 0x0000000118f50ef0 0x0 + 4713680624
              37 ??? 0x0000000118f50950 0x0 + 4713679184
              38 ??? 0x0000000111d3f70c 0x0 + 4594071308
              39 ??? 0x0000000118f506e0 0x0 + 4713678560
              40 ??? 0x0000000111df3b34 0x0 + 4594809652
              41 ??? 0x0000000118f506e0 0x0 + 4713678560
              42 ??? 0x0000000118f506e0 0x0 + 4713678560
              43 ??? 0x0000000118f50950 0x0 + 4713679184
              44 ??? 0x0000000118f50950 0x0 + 4713679184
              45 ??? 0x0000000118f50950 0x0 + 4713679184
              46 ??? 0x0000000118f50ef0 0x0 + 4713680624
              47 ??? 0x0000000118f506e0 0x0 + 4713678560
              48 ??? 0x0000000118f50c80 0x0 + 4713680000
              49 ??? 0x0000000118f506e0 0x0 + 4713678560
              50 ??? 0x0000000118f50950 0x0 + 4713679184
              51 ??? 0x0000000118f50950 0x0 + 4713679184
              52 ??? 0x0000000118f50950 0x0 + 4713679184
              53 ??? 0x0000000118f4c114 0x0 + 4713660692
              54 libjvm.dylib 0x0000000108687d50 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 992
              55 libjvm.dylib 0x00000001086fa798 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 1036
              56 libjvm.dylib 0x00000001086ff248 jni_CallVoidMethod + 284
              57 libglass.dylib 0x000000010810a044 Java_com_sun_glass_ui_mac_MacView__1finishInputMethodComposition + 14664
              58 AppKit 0x0000000186c131e4 forwardMethod + 252
              59 AppKit 0x0000000187893c30 _routeMouseUpEvent + 132
              60 AppKit 0x00000001878939ac -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 440
              61 AppKit 0x0000000187893470 -[NSWindow(NSEventRouting) sendEvent:] + 372
              62 libglass.dylib 0x000000010810ea78 Java_com_sun_glass_ui_mac_MacView__1finishInputMethodComposition + 33660
              63 AppKit 0x00000001875a24ac -[NSApplication(NSEventRouting) sendEvent:] + 1276
              64 AppKit 0x000000018709c6ec -[NSApplication _handleEvent:] + 60
              65 AppKit 0x0000000186b49748 -[NSApplication run] + 408
              66 libglass.dylib 0x00000001080efb04 JNI_OnLoad + 9076
              67 Foundation 0x0000000183f820c4 __NSThreadPerformPerform + 264
              68 CoreFoundation 0x0000000182763ad8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
              69 CoreFoundation 0x0000000182763a6c __CFRunLoopDoSource0 + 172
              70 CoreFoundation 0x00000001827637d8 __CFRunLoopDoSources0 + 232
              71 CoreFoundation 0x0000000182762468 __CFRunLoopRun + 820
              72 CoreFoundation 0x0000000182820898 _CFRunLoopRunSpecificWithOptions + 532
              73 libjli.dylib 0x00000001025e4f64 CreateExecutionEnvironment + 412
              74 libjli.dylib 0x00000001025e0a0c JLI_Launch + 560
              75 java 0x000000010259bbb4 main + 404
              76 dyld 0x0000000182305d54 start + 7184
      )'
      *** First throw call stack:
      (
              0 CoreFoundation 0x00000001827b4770 __exceptionPreprocess + 176
              1 libobjc.A.dylib 0x0000000182292418 objc_exception_throw + 88
              2 CoreFoundation 0x00000001828837fc -[NSException initWithCoder:] + 0
              3 AppKit 0x00000001877e2618 __25-[NSWindow setStyleMask:]_block_invoke + 212
              4 AppKit 0x0000000186b729b0 NSPerformVisuallyAtomicChange + 108
              5 AppKit 0x00000001877e2490 -[NSWindow setStyleMask:] + 176
              6 libglass.dylib 0x00000001081106f8 Java_com_sun_glass_ui_mac_MacWindow__1setEnabled + 444
              7 ??? 0x0000000118f54500 0x0 + 4713694464
              8 ??? 0x0000000118f50950 0x0 + 4713679184
              9 ??? 0x0000000118f50950 0x0 + 4713679184
              10 ??? 0x0000000118f50950 0x0 + 4713679184
              11 ??? 0x0000000118f50950 0x0 + 4713679184
              12 ??? 0x0000000118f50ef0 0x0 + 4713680624
              13 ??? 0x0000000118f50950 0x0 + 4713679184
              14 ??? 0x0000000118f50950 0x0 + 4713679184
              15 ??? 0x0000000118f50950 0x0 + 4713679184
              16 ?
      libc++abi: terminating due to uncaught exception of type NSException

      The issue can be reproduced with any JavaFX version, including head.

        1. patch.diff
          2 kB
          Jose Pereda
        2. FullscreenTest2.java
          1 kB
          Jose Pereda
        3. FullscreenTest.java
          1 kB
          Jose Pereda
        4. fix-fs-crash.patch
          2 kB
          Kevin Rushforth
        5. 5. orphan dialog.png
          936 kB
          Jose Pereda
        6. 4. java space.png
          939 kB
          Jose Pereda
        7. 3. Mission control.png
          1.34 MB
          Jose Pereda
        8. 2. application and dialog.png
          247 kB
          Jose Pereda
        9. 1. application.png
          240 kB
          Jose Pereda

            Assignee:
            Jose Pereda
            Reporter:
            Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: