Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8127293

Mac: JavaFX Crashes on OS X when closing a Stage with StateStyle.UTILITY

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 8
    • fx2.1
    • javafx
    • OS X 10.7.3
      JavaFX 2.1.0 b16
      $ java -version
      java version "1.6.0_31"
      Java(TM) SE Runtime Environment (build 1.6.0_31-b04-411-11M3616)
      Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-411, mixed mode)

      My application is Swing-based with a JFXPanel. I created an Application Modal Stage with StageStyle.UTILITY using jfxPanel.getScene().getWindow() as the owner window.

      I saw the following messages in the console and the final one ("terminating app...") when I clicked the close button on the "dialog" Stage.


      2012-03-11 23:51:05.894 java[9233:2007] *** Assertion failure in -[NSMenuItem setSubmenu:], /SourceCache/AppKit/AppKit-1138.32/Menus.subproj/NSMenuItem.m:755
      2012-03-11 23:51:05.895 java[9233:2007] Menu to be set as submenu is already a submenu of some menu.
      2012-03-11 23:51:05.897 java[9233:2007] (
      0 CoreFoundation 0x00007fff868d5fc6 __exceptionPreprocess + 198
      1 libobjc.A.dylib 0x00007fff90912d5e objc_exception_throw + 43
      2 CoreFoundation 0x00007fff868d5dfa +[NSException raise:format:arguments:] + 106
      3 Foundation 0x00007fff897e4743 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
      4 AppKit 0x00007fff86add662 -[NSMenuItem setSubmenu:] + 211
      5 libawt.jnilib 0x00000001131dfeef -[CMenuBar _nativeAddMenuAtIndex:] + 231
      6 libawt.jnilib 0x00000001131cab5a +[CMenuBar activate:modallyDisabled:] + 930
      7 Foundation 0x00007fff8972fd32 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 47
      8 CoreFoundation 0x00007fff8687eaaa _CFXNotificationPost + 2634
      9 Foundation 0x00007fff8971bfe7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 65
      10 AppKit 0x00007fff86bcdc6e -[NSWindow becomeKeyWindow] + 1345
      11 AppKit 0x00007fff86bc8af3 -[NSWindow _changeKeyAndMainLimitedOK:] + 690
      12 AppKit 0x00007fff86b9af0b -[NSWindow sendEvent:] + 4301
      13 libawt.jnilib 0x00000001131e05a7 -[CocoaAppWindow sendEvent:] + 185
      14 AppKit 0x00007fff86b3416d -[NSApplication sendEvent:] + 5593
      15 AppKit 0x00007fff86aca1f2 -[NSApplication run] + 555
      16 libawt.jnilib 0x00000001131bb66c +[AWTStarter startAWT:] + 1495
      17 libawt.jnilib 0x00000001131bafe6 -[CPerformer perform] + 93
      18 CoreFoundation 0x00007fff868c575d -[NSObject performSelector:withObject:] + 61
      19 Foundation 0x00007fff89768d94 __NSThreadPerformPerform + 214
      20 CoreFoundation 0x00007fff868446e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      21 CoreFoundation 0x00007fff86843f4d __CFRunLoopDoSources0 + 253
      22 CoreFoundation 0x00007fff8686ad39 __CFRunLoopRun + 905
      23 CoreFoundation 0x00007fff8686a676 CFRunLoopRunSpecific + 230
      24 java 0x000000010ae74843 java + 18499
      25 java 0x000000010ae7429a java + 17050
      26 java 0x000000010ae71a98 java + 6808
      27 ??? 0x0000000000000009 0x0 + 9
      )
      2012-03-11 23:51:23.332 java[9233:2007] *** Assertion failure in -[NSMenuItem setSubmenu:], /SourceCache/AppKit/AppKit-1138.32/Menus.subproj/NSMenuItem.m:755
      2012-03-11 23:51:23.332 java[9233:2007] An uncaught exception was raised
      2012-03-11 23:51:23.333 java[9233:2007] Menu to be set as submenu is already a submenu of some menu.
      2012-03-11 23:51:23.334 java[9233:2007] (
      0 CoreFoundation 0x00007fff868d5fc6 __exceptionPreprocess + 198
      1 libobjc.A.dylib 0x00007fff90912d5e objc_exception_throw + 43
      2 CoreFoundation 0x00007fff868d5dfa +[NSException raise:format:arguments:] + 106
      3 Foundation 0x00007fff897e4743 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
      4 AppKit 0x00007fff86add662 -[NSMenuItem setSubmenu:] + 211
      5 libawt.jnilib 0x00000001131dfeef -[CMenuBar _nativeAddMenuAtIndex:] + 231
      6 libawt.jnilib 0x00000001131cab5a +[CMenuBar activate:modallyDisabled:] + 930
      7 Foundation 0x00007fff8972fd32 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 47
      8 CoreFoundation 0x00007fff8687eaaa _CFXNotificationPost + 2634
      9 Foundation 0x00007fff8971bfe7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 65
      10 AppKit 0x00007fff86bcdc6e -[NSWindow becomeKeyWindow] + 1345
      11 AppKit 0x00007fff86bc8af3 -[NSWindow _changeKeyAndMainLimitedOK:] + 690
      12 AppKit 0x00007fff86c506a9 -[NSWindow _orderOutAndCalcKeyWithCounter:stillVisible:docWindow:] + 874
      13 AppKit 0x00007fff86bc9e4e -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3152
      14 AppKit 0x00007fff86bc907e -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 656
      15 AppKit 0x00007fff86bc8d99 -[NSWindow orderWindow:relativeTo:] + 154
      16 libglass.dylib 0x00000001197102f0 Java_com_sun_glass_ui_mac_MacWindow__1setVisible + 576
      17 ??? 0x000000010b916d6e 0x0 + 4489047406
      18 ??? 0x000000010b90ba82 0x0 + 4489001602
      )
      2012-03-11 23:51:23.335 java[9233:2007] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Menu to be set as submenu is already a submenu of some menu.'
      *** First throw call stack:
      (
      0 CoreFoundation 0x00007fff868d5fc6 __exceptionPreprocess + 198
      1 libobjc.A.dylib 0x00007fff90912d5e objc_exception_throw + 43
      2 CoreFoundation 0x00007fff868d5dfa +[NSException raise:format:arguments:] + 106
      3 Foundation 0x00007fff897e4743 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
      4 AppKit 0x00007fff86add662 -[NSMenuItem setSubmenu:] + 211
      5 libawt.jnilib 0x00000001131dfeef -[CMenuBar _nativeAddMenuAtIndex:] + 231
      6 libawt.jnilib 0x00000001131cab5a +[CMenuBar activate:modallyDisabled:] + 930
      7 Foundation 0x00007fff8972fd32 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 47
      8 CoreFoundation 0x00007fff8687eaaa _CFXNotificationPost + 2634
      9 Foundation 0x00007fff8971bfe7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 65
      10 AppKit 0x00007fff86bcdc6e -[NSWindow becomeKeyWindow] + 1345
      11 AppKit 0x00007fff86bc8af3 -[NSWindow _changeKeyAndMainLimitedOK:] + 690
      12 AppKit 0x00007fff86c506a9 -[NSWindow _orderOutAndCalcKeyWithCounter:stillVisible:docWindow:] + 874
      13 AppKit 0x00007fff86bc9e4e -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3152
      14 AppKit 0x00007fff86bc907e -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 656
      15 AppKit 0x00007fff86bc8d99 -[NSWindow orderWindow:relativeTo:] + 154
      16 libglass.dylib 0x00000001197102f0 Java_com_sun_glass_ui_mac_MacWindow__1setVisible + 576
      17 ??? 0x000000010b916d6e 0x0 + 4489047406
      18 ??? 0x000000010b90ba82 0x0 + 4489001602
      )
      terminate called throwing an exception./myapplication.sh: line 4: 9233 Abort trap: 6 /usr/libexec/java_home -v1.6 --exec java -ea -Djava.library.path=$PI_LIBRARY_PATH $JAVA_ARGS

            pchelko Petr Pchelko (Inactive)
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: