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

Selecting an item from a popup menu list causes a core dump

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • sparc
    • solaris_2.5.1

      Using a popup menu in the JNI'd motif/awt causes a core dump.

      [ Note, I plan on putting back a temporary fix that will
       prevent the crashes, but leaks objects. This needs to
       be properly fixed, though! ]

      To reproduce, bring up hotjava and run the PopupMenuTest from
      the build tree. Another option is to right mouse over an image
      and try to select any menu item.

      What's happening is that the Popup menu calls dispose on itself
      and all its menu items, and then the event loop tries to dispatch
      an event from one of the disposed menuitems. In the non JNI code,
      this worked because the two events happened so quickly that nothing
      had time to be disturbed. The JNI'd code requires the use of global
      refs for event dispatching, and these are immediately invalidated
      by the call to dispose. The following event dispatch gets a bad
      handle to the former menuitem and causes a crash.

      I am putting back a temporary fix that prevents the popup menu
      from freeing any of its menu items. This should prevent customers
      from seeing core dumps in jdk1.2 EA2, but it still needs to be
      fixed correctly!

            xdengsunw Xianfa Deng (Inactive)
            jmcilreesunw James Mcilree (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: