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

Closing a custom stage crashes the application

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7u10, 7u15
    • javafx

      I have a Java application using Netbeans RCP and JavaFX. Whenever an additional stage is initialized and displayed, and then closed, the entire application crashes. A dialog saying "<application name> quit unexpectedly while using the liblwawt.dylib plug-in" pops up.

      The following is written to the log:

      java[3532:707] *** Assertion failure in -[NSMenuItem setSubmenu:], /SourceCache/AppKit/AppKit-1187.34/Menus.subproj/NSMenuItem.m:757
      java[3532:707] An uncaught exception was raised
      java[3532:707] Menu to be set as submenu is already a submenu of some menu.
      java[3532:707] (
      0 CoreFoundation 0x00007fff8f9700a6 __exceptionPreprocess + 198
      1 libobjc.A.dylib 0x00007fff8f35b3f0 objc_exception_throw + 43
      2 CoreFoundation 0x00007fff8f96fee8 +[NSException raise:format:arguments:] + 104
      3 Foundation 0x00007fff93fc36a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
      4 AppKit 0x00007fff9166aa50 -[NSMenuItem setSubmenu:] + 200
      5 liblwawt.dylib 0x0000000118610862 -[CMenuBar nativeAddMenuAtIndex_OnAppKitThread:] + 312
      6 liblwawt.dylib 0x0000000118610f88 +[CMenuBar activate:modallyDisabled:] + 981
      7 liblwawt.dylib 0x0000000118602975 -[AWTWindow windowDidBecomeKey:] + 141
      8 CoreFoundation 0x00007fff8f92247a _CFXNotificationPost + 2554
      9 Foundation 0x00007fff93fff846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
      10 AppKit 0x00007fff9177db46 -[NSWindow becomeKeyWindow] + 1344
      11 AppKit 0x00007fff9177d004 -[NSWindow _changeKeyAndMainLimitedOK:] + 719
      12 AppKit 0x00007fff9185b3fc -[NSWindow _orderOutAndCalcKeyWithCounter:stillVisible:docWindow:] + 909
      13 AppKit 0x00007fff91785249 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3218
      14 AppKit 0x00007fff91784138 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
      15 AppKit 0x00007fff91783d1f -[NSWindow orderWindow:relativeTo:] + 159
      16 libglass.dylib 0x000000011df404b0 Java_com_sun_glass_ui_mac_MacWindow__1setVisible + 768
      17 ??? 0x00000001082c8f90 0x0 + 4432105360
      )
      java[3532:707] *** 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 0x00007fff8f9700a6 __exceptionPreprocess + 198
      1 libobjc.A.dylib 0x00007fff8f35b3f0 objc_exception_throw + 43
      2 CoreFoundation 0x00007fff8f96fee8 +[NSException raise:format:arguments:] + 104
      3 Foundation 0x00007fff93fc36a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
      4 AppKit 0x00007fff9166aa50 -[NSMenuItem setSubmenu:] + 200
      5 liblwawt.dylib 0x0000000118610862 -[CMenuBar nativeAddMenuAtIndex_OnAppKitThread:] + 312
      6 liblwawt.dylib 0x0000000118610f88 +[CMenuBar activate:modallyDisabled:] + 981
      7 liblwawt.dylib 0x0000000118602975 -[AWTWindow windowDidBecomeKey:] + 141
      8 CoreFoundation 0x00007fff8f92247a _CFXNotificationPost + 2554
      9 Foundation 0x00007fff93fff846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
      10 AppKit 0x00007fff9177db46 -[NSWindow becomeKeyWindow] + 1344
      11 AppKit 0x00007fff9177d004 -[NSWindow _changeKeyAndMainLimitedOK:] + 719
      12 AppKit 0x00007fff9185b3fc -[NSWindow _orderOutAndCalcKeyWithCounter:stillVisible:docWindow:] + 909
      13 AppKit 0x00007fff91785249 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3218
      14 AppKit 0x00007fff91784138 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
      15 AppKit 0x00007fff91783d1f -[NSWindow orderWindow:relativeTo:] + 159
      16 libglass.dylib 0x000000011df404b0 Java_com_sun_glass_ui_mac_MacWindow__1setVisible + 768
      17 ??? 0x00000001082c8f90 0x0 + 4432105360
      )
      libc++abi.dylib: terminate called throwing an exception

      I have prepared a small sample application that can reproduce the problem, but I don't know how to attach it to the issue.

            art Artem Ananiev (Inactive)
            tkillingbjfx Tarje Killingberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: