problem with GUI hanging before being displayed

  • Thread starter Walter Gildersleeve
  • Start date
W

Walter Gildersleeve

Hello,

I've got a large program that tends to hang before the GUI appears.
There's a deadlock freezing the EventQueue, but I cannot see how it
comes to that. The location seems relatively clear :
[snip]
javax.swing.text.DefaultStyledDocument@14B0D10/16CCA90: <unowned>
Waiting to be notified:
"primary-onlineapp-thread" (0x5ad0150)
java.awt.Component$AWTTreeLock@14C2230/161BE18: owner
"primary-onlineapp-thread" (0x5ad0150) 5 entries
Waiting to enter:
"MxPDM connect-to-ematrix" (0x72fb220)
"AWT-EventQueue-0" (0x627c798)
[/snip]
I imagine that the DefaultStyledDocument instance is notified by the
EventQueue; if so, then the deadlock is clear.

Questions: Why is the "primary-onlineapp-thread" the owner of the
AWTTreeLock? When calling Window#show(), isn't the calling thread
supposed to return immediately? How might I have inadvertently
captured the tree lock ownership?

Any insights would be very much appreciated.

Walter Gildersleeve
Productivity Engineering, GmbH
Freiburg, Germany


Full thread dump Classic VM (JDK-1.2.2_011, native threads):
"PartFileUpdater watcher" (TID:0x140e9f8, sys_thread_t:0x732a100,
state:CW, native ID:0x8c0) prio=5
at java.lang.Object.wait(Native Method)
at com.pe_gmbh.online.eda.PartFileUpdater$SaverThread.run(PartFileUpdater.java,
Compiled Code)
"MxPDM connect-to-ematrix" (TID:0x140e250, sys_thread_t:0x72fb220,
state:MW, native ID:0x2a0) prio=5
at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:48)
at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:39)
at javax.swing.JComponent.setUI(JComponent.java, Compiled
Code)
at javax.swing.JPanel.updateUI(JPanel.java:103)
at javax.swing.JPanel.<init>(JPanel.java:63)
at javax.swing.JPanel.<init>(JPanel.java:93)
at javax.swing.JRootPane.createGlassPane(JRootPane.java:217)
at javax.swing.JRootPane.<init>(JRootPane.java:174)
at javax.swing.JDialog.createRootPane(JDialog.java:224)
at javax.swing.JDialog.dialogInit(JDialog.java:218)
at javax.swing.JDialog.<init>(JDialog.java:155)
at javax.swing.JDialog.<init>(JDialog.java:126)
at matrix.vui.MxDialog.<init>(MxDialog.java:122)
at matrix.common.SimpleDialog.<init>(SimpleDialog.java:132)
at matrix.matrix.ContextDialog.<init>(ContextDialog.java:157)
at com.pe_gmbh.online.mxpdm.AbstractMatrixPeer.showContextDialog(AbstractMatrixPeer.java:64)
at com.pe_gmbh.online.mxpdm.MxPdmSystem.selectContext(MxPdmSystem.java:279)
at com.pe_gmbh.online.mxpdm.MxPdmSystem$2.run(MxPdmSystem.java:78)
"TimerQueue" (TID:0x14d7660, sys_thread_t:0x64997d8, state:CW,
native ID:0x1cc) prio=5
at java.lang.Object.wait(Native Method)
at javax.swing.TimerQueue.run(TimerQueue.java:229)
at java.lang.Thread.run(Thread.java:472)
"AWT-Windows" (TID:0x1478fc0, sys_thread_t:0x62a5400, state:R,
native ID:0x8d8) prio=5
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:130)
at java.lang.Thread.run(Thread.java:472)
"SunToolkit.PostEventQueue-0" (TID:0x1478d58,
sys_thread_t:0x62a5da8, state:CW, native ID:0x6c0) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:417)
at sun.awt.PostEventQueue.run(SunToolkit.java:406)
"AWT-EventQueue-0" (TID:0x1478d88, sys_thread_t:0x627c798,
state:MW, native ID:0x994) prio=6
at java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.java:89)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:84)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:76)
"Thread-1" (TID:0x14c2018, sys_thread_t:0x2f4f40, state:CW, native
ID:0xae0) prio=5
"primary-onlineapp-thread" (TID:0x14c22d0, sys_thread_t:0x5ad0150,
state:CW, native ID:0x974) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java, Compiled Code)
at javax.swing.text.AbstractDocument.readLock(AbstractDocument.java:1004)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:570)
at javax.swing.JComponent.getPreferredSize(JComponent.java:838)
at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:985)
at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:515)
at java.awt.Container.preferredSize(Container.java:636)
at java.awt.Container.getPreferredSize(Container.java:619)
at javax.swing.JComponent.getPreferredSize(JComponent.java:840)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:71)
at java.awt.Container.preferredSize(Container.java:636)
at java.awt.Container.getPreferredSize(Container.java:619)
at javax.swing.JComponent.getPreferredSize(JComponent.java:840)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:452)
at java.awt.Container.preferredSize(Container.java:636)
at java.awt.Container.getPreferredSize(Container.java:619)
at javax.swing.JComponent.getPreferredSize(JComponent.java:840)
at javax.swing.plaf.basic.BasicSplitPaneUI$BasicVerticalLayoutManager.preferredLayoutSize(BasicSplitPaneUI.java:1785)
at javax.swing.plaf.basic.BasicSplitPaneUI.getPreferredSize(BasicSplitPaneUI.java:978)
at javax.swing.JComponent.getPreferredSize(JComponent.java:838)
at javax.swing.plaf.basic.BasicSplitPaneUI$BasicVerticalLayoutManager.getPreferredSizeOfComponent(BasicSplitPaneUI.java:1682)
at javax.swing.plaf.basic.BasicSplitPaneUI$BasicHorizontalLayoutManager.layoutContainer(BasicSplitPaneUI.java:1322)
at java.awt.Container.layout(Container.java:487)
at java.awt.Container.doLayout(Container.java:477)
at java.awt.Container.validateTree(Container.java:546)
at java.awt.Container.validateTree(Container.java:553)
at java.awt.Container.validateTree(Container.java:553)
at java.awt.Container.validateTree(Container.java:553)
at java.awt.Container.validateTree(Container.java:553)
at java.awt.Container.validate(Container.java:528)
at java.awt.Window.show(Window.java:280)
at com.pe_gmbh.online.swing.OnlineFrame.show(OnlineFrame.java,
Compiled Code)
at com.pe_gmbh.online.main.Controller.beginProcessing(Controller.java:780)
at com.pe_gmbh.online.OnlineApp$3.run(OnlineApp.java:55)
"Thread-0" (TID:0x14c1510, sys_thread_t:0x5acd5c8, state:CW,
native ID:0x8a8) prio=5
at java.lang.Thread.sleep(Native Method)
at com.pe_gmbh.online.OnlineApp$1.run(OnlineApp.java, Compiled
Code)
"SymcJIT-LazyCompilation-0" (TID:0x14be468,
sys_thread_t:0x4a2c0d8, state:CW, native ID:0x96c) prio=1
at SymantecJITCompilationThread.DoCompileMethod(Native Method)
at SymantecJITCompilationThread.run(JITcompilationthread.java,
Compiled Code)
"SymcJIT-LazyCompilation-PA" (TID:0x14be430,
sys_thread_t:0x4a2bf68, state:CW, native ID:0x7e8) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:417)
at SymantecJITCompilationThread.run(JITcompilationthread.java,
Compiled Code)
"Finalizer" (TID:0x14b9320, sys_thread_t:0x4970758, state:CW,
native ID:0x284) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java,
Compiled Code)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java,
Compiled Code)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:167)
"Reference Handler" (TID:0x14b93b0, sys_thread_t:0x496d480,
state:CW, native ID:0x764) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java, Compiled Code)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:107)
"Signal dispatcher" (TID:0x14b93e0, sys_thread_t:0x496c710,
state:R, native ID:0x6e0) prio=5
Monitor Cache Dump:
SymantecJITCompilationThread@14BE468/1515A30: <unowned>
Waiting to be notified:
"SymcJIT-LazyCompilation-PA" (0x4a2bf68)
javax.swing.TimerQueue@14D7620/1628188: <unowned>
Waiting to be notified:
"TimerQueue" (0x64997d8)
java.lang.Object@140E9C0/1952870: <unowned>
Waiting to be notified:
"PartFileUpdater watcher" (0x732a100)
sun.awt.PostEventQueue@1478D58/166EFB0: <unowned>
Waiting to be notified:
"SunToolkit.PostEventQueue-0" (0x62a5da8)
java.lang.ref.ReferenceQueue$Lock@14B9338/14EED08: <unowned>
Waiting to be notified:
"Finalizer" (0x4970758)
java.lang.ref.Reference$Lock@14B93C0/14EE848: <unowned>
Waiting to be notified:
"Reference Handler" (0x496d480)
javax.swing.text.DefaultStyledDocument@14B0D10/16CCA90: <unowned>
Waiting to be notified:
"primary-onlineapp-thread" (0x5ad0150)
java.awt.Component$AWTTreeLock@14C2230/161BE18: owner
"primary-onlineapp-thread" (0x5ad0150) 5 entries
Waiting to enter:
"MxPDM connect-to-ematrix" (0x72fb220)
"AWT-EventQueue-0" (0x627c798)
Registered Monitor Dump:
SymcJIT Method Monitor: <unowned>
SymcJIT Method Monitor: <unowned>
SymcJIT Method Monitor: <unowned>
SymcJIT Lazy Queue Lock: <unowned>
Waiting to be notified:
"SymcJIT-LazyCompilation-0" (0x4a2c0d8)
SymcJIT Method Monitor: <unowned>
SymcJIT Method List Monitor: <unowned>
SymcJIT Lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "Signal dispatcher" (0x496c710) 1 entry
Thread queue lock: owner "Signal dispatcher" (0x496c710) 1 entry
Waiting to be notified:
"Thread-1" (0x2f4f40)
Monitor registry: owner "Signal dispatcher" (0x496c710) 1 entry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top