JDK-4735461 : JDeveloper frozen when showing a dialog on activation
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-08-22
  • Updated: 2002-10-28
  • Resolved: 2002-10-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Description

Name: pa48320			Date: 08/22/2002


When running JDeveloper with JDK 1.4.0_01, we experienced from time to time un-explainable deadlocks. The deadlocks did not seem to be linked to a particular function of JDeveloper except for one reproducable test case.  Our final 9.0.3 version contains a workaround for this case that can easily be disabled. We hope that fixing the source of this bug will solve the other random deadlocks we experienced.


If you modify a source file in JDeveloper, switch to an external editor, modify and save the same source then switch back to JDeveloper, it will popup a dialog and ask if you want to reload the file.

When running JDeveloper 9.0.3 using the JDK 1.3, everything goes well but when running JDK 1.4.0_01, this operation caused a deadlock.
We found a temporary workaround which is to show the dialog from an invokeLater() although the operation was correct (the dialog was already shown from the event thread).

The workaround can be disabled by adding the following line to .../jdev/system/ide.properties:
  HAS_BUG_2435195=false

Here is a stack dump:
Full thread dump Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode):

"Navigator Overlay Updater" prio=2 tid=0x280AEAE8 nid=0x188 waiting on monitor [2944f000..2944fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <066B5878> (a oracle.ideimpl.navigator.NodeOverlayManagerImpl$OverlayThread)
        at java.lang.Object.wait(Object.java:426)
        at oracle.ideimpl.navigator.NodeOverlayManagerImpl$OverlayThread.run(NodeOverlayManagerImpl.java:505)
        - locked <066B5878> (a oracle.ideimpl.navigator.NodeOverlayManagerImpl$OverlayThread)

"Thread-8" prio=7 tid=0x27E01030 nid=0xb20 waiting on monitor [28f4f000..28f4fdb4]
        at java.lang.Thread.sleep(Native Method)
        at oracle.ide.util.MonitorThread$1.run(MonitorThread.java:118)

"TimerQueue" daemon prio=5 tid=0x27DD1408 nid=0x8d0 waiting on monitor [2894f000..2894fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <0685EBC8> (a javax.swing.TimerQueue)
        at javax.swing.TimerQueue.run(TimerQueue.java:231)
        - locked <0685EBC8> (a javax.swing.TimerQueue)
        at java.lang.Thread.run(Thread.java:536)

"Version Operation Thread" prio=5 tid=0x00A77CB8 nid=0xa74 waiting on monitor [28d4f000..28d4fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <066D5A48> (a oracle.ideimpl.scm.impl.OperationThread)
        at oracle.ideimpl.scm.impl.OperationThread.run(OperationThread.java:168)
        - locked <066D5A48> (a oracle.ideimpl.scm.impl.OperationThread)

"Thread-2" prio=5 tid=0x27FF30E0 nid=0x380 waiting on monitor [28b4f000..28b4fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <065A9C20> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:426)
        at java.util.TimerThread.mainLoop(Timer.java:403)
        - locked <065A9C20> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:382)

"AWT-EventQueue-0" prio=7 tid=0x27D4C270 nid=0x44c waiting on monitor [27f4f000..27f4fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <064B52F8> (a java.awt.EventQueue)
        at java.lang.Object.wait(Object.java:426)
        at java.awt.EventQueue.getNextEvent(EventQueue.java:361)
        - locked <064B52F8> (a java.awt.EventQueue)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:155)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.SequencedEvent.dispatch(SequencedEvent.java:72)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:134)
        at java.awt.Dialog.show(Dialog.java:524)
        at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:822)
        at oracle.ide.dialogs.SelectFilesPanel.showDialog(SelectFilesPanel.java:179)
        at oracle.ide.dialogs.SelectFilesPanel.showDialog(SelectFilesPanel.java:156)
        at oracle.ideimpl.MainWindowImpl$ReloadBuffersHandler._handleAppSwitch(MainWindowImpl.java:2291)
        at oracle.ideimpl.MainWindowImpl$ReloadBuffersHandler.handleAppSwitch(MainWindowImpl.java:2202)
        at oracle.ideimpl.MainWindowImpl$ReloadBuffersHandler.eventDispatched(MainWindowImpl.java:2121)
        at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2114)
        at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2008)
        at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3441)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1700)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:700)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:403)
        at java.awt.Component.dispatchEventImpl(Component.java:3396)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.SequencedEvent.dispatch(SequencedEvent.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

"AWT-Windows" daemon prio=7 tid=0x00DEDCB8 nid=0xd28 runnable [187f000..187fdb4]
        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(WToolkit.java:240)
        at java.lang.Thread.run(Thread.java:536)

"AWT-Shutdown" prio=5 tid=0x00DED868 nid=0x920 waiting on monitor [177f000..177fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <0648FAD0> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:426)
        at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
        - locked <0648FAD0> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:536)

"Signal Dispatcher" daemon prio=10 tid=0x0088D538 nid=0x9c0 waiting on monitor [0..0]

"Finalizer" daemon prio=9 tid=0x00A46280 nid=0xfb4 waiting on monitor [121f000..121fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <061C9810> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <061C9810> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x00D206C0 nid=0x1e8 waiting on monitor [111f000..111fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <061C9878> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:426)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
        - locked <061C9878> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=0x00885AC8 nid=0xce0 waiting on monitor [0..12f7d4]

"VM Thread" prio=5 tid=0x00AE64D8 nid=0x8e4 runnable

"VM Periodic Task Thread" prio=10 tid=0x00A48618 nid=0x500 waiting on monitor
"Suspend Checker Thread" prio=10 tid=0x00A49318 nid=0xd88 runnable
(Review ID: 160901) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
2004-08-24

EVALUATION Just from examining the thread dump, neither ###@###.### or I saw an obvious deadlock. However, it could be that the toolkit thread is calling ::sendMessage or something like that, and that is where the deadlock lies. I wonder if there are multiple AppContexts in use? I wonder if this is related to the focus work we just integrated into build 2 of Mantis (i.e. was fixed by the AWT putback on August 21)? I'll commit this to Mantis so we can track it. ###@###.### 2002-08-22 It is very likely that the problem is fixed in Mantis b02: we have fixed a bug that looked very similar by its description to this one. We need the submitter to run the application with Mantis b02 and see if the problem is still present. Moving to incomplete till this info is available. ###@###.### 2002-10-01 Submitter confirmed that the problem is fixed in b04 (the first mantis build available to submitter). Marking as integrated. ###@###.### 2002-10-28
2002-10-01