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

Need work-around for Motif BugID 4411356 to prevent DnD FileDialog crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.1, 1.4.0
    • client-libs
    • None
    • beta
    • generic, sparc
    • solaris_2.5, solaris_8
    • Verified

      We have determined that the cause of the crash in regression test
      test/java/awt/Component/ComponentLeakTest is a Motif bug. Since a Motif fix
      may not be available for sometime, we need to work-around this bug in our code.


      Date: Fri, 2 Feb 2001 21:41:19 +0300
      From: "Danila A. Sinopalnikov" <###@###.###>
      To: David Mendenhall <###@###.###>
      Cc: ###@###.###
      Subject: Re: ComponentLeakTest crash
      Mime-Version: 1.0
      Content-Disposition: inline
      User-Agent: Mutt/1.2.5i

      Hi Dave,

      i reproduced this bug once with the ComponentLeakTest. The stack trace
      was exactly the same as the one you sent to me. It looks like this
      problem is specific for FileDialog with an associated drop target. On
      Solaris we use Motif XmFileSelectionDialog which is a compound objects
      which contains several child widgets with Motif preregistered drop
      sites - XmTextField widgets and scrollbars of XmScrolledWindow
      widgets. When the FileDialog is disposed we remove a drop target. When
      the drop target is removed the corresponding Motif drop site of the
      dialog is unregistered. Then we proceed with disposal and destroy
      XmFileSelectionDialog. It destroys all its children which unregister
      their drop sites in corresponding destroy callbacks.
      The test crashes when the drop site of a vertical scrollbar of a
      scrolled window of a list is unregistered. It attempts to access a
      parent drop site which is the dialog drop site which was previously
      unregistered and its structures are destroyed. The crash happens when
      we access the destroyed structure via dangling pointers.

      I wrote a simple Motif test case (filedialog.c) which simulates the
      ComponentLeakTest: it creates a file dialog and registers a drop site
      on it, then unregisters a drop site and destroys the dialog.
      The test crashes in exactly the same way. To reproduce run the test
      case and press "Ok".

      The test issues a warning:
      Warning:
          Name:
          Class: XmFileSelectionBox
          Registering a widget as a drop site out of sequence.
          Ancestors must be registered before any of their
          descendants are registered.

      But this warning is not the cause of the crash.

      It looks like this is a Motif bug: if we register a composite drop
      site on a parent widget, then register a drop site on its child, then
      unregister the parent drop site, the test will crash if we try to
      unregister a child drop site.

      I checked it with another test case (checkbox.c). To reproduce the
      crash, run the test and click 3 times on the checkbox. It will
      demonstrate the same crash.

      It is unclear why the java test case doesn't crash every time.

      Currently the best solution i see is to unregister drop targets
      registered on the file dialog children before we register a drop site
      on a file dialog. I have to test it before sending.

      Thanks,
      Danila.

            dassunw Das Das (Inactive)
            dmendenhsunw David Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: