1

我们应用程序中的自动崩溃报告器有时会在关闭应用程序时报告挂起。我们在内部没有观察到这一点。摆动线程挂在 ApplicationShutdownHooks.runHooks() 中,我认为这可能是因为 WToolkit.shutdown() 永远不会返回。我不知道是什么原因造成的。谁能帮我解决导致挂起的原因?这是一个完整的线程转储。谢谢!JRE 是 1.6.0_35。

    Thread[AWT-EventQueue-0,6,main] WAITING :
    at java.lang.Object.wait(Native Method)
    at java.lang.Thread.join(Unknown Source)
    at java.lang.Thread.join(Unknown Source)
    at java.lang.ApplicationShutdownHooks.runHooks(Unknown Source)
    at java.lang.ApplicationShutdownHooks$1.run(Unknown Source)
    at java.lang.Shutdown.runHooks(Unknown Source)
    at java.lang.Shutdown.sequence(Unknown Source)
    at java.lang.Shutdown.exit(Unknown Source)
    at java.lang.Runtime.exit(Unknown Source)
    at java.lang.System.exit(Unknown Source)
    at com.biomatters.iseek.application.ISeekFrame$11$2.run(ISeekFrame.java:555)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    Thread[Hang Watcher,10,main] RUNNABLE :
    at java.lang.Thread.dumpThreads(Native Method)
    at java.lang.Thread.getAllStackTraces(Unknown Source)
    at com.biomatters.utilities.HangWatcher.getAllThreadStackTraces(HangWatcher.java:77)
    at com.biomatters.geneious.common.talkback.client.TalkbackIncidentFactory.fieldsForHang(TalkbackIncidentFactory.java:437)
    at com.biomatters.geneious.common.talkback.client.TalkbackIncidentFactory.forHang(TalkbackIncidentFactory.java:186)
    at com.biomatters.geneious.common.ErrorUtilities.handleHang(ErrorUtilities.java:78)
    at com.biomatters.iseek.application.ISeekMain$16.handleHang(ISeekMain.java:1091)
    at com.biomatters.utilities.HangWatcher$2.run(HangWatcher.java:59)

    Thread[Exe4JStartupThread,5,main] TIMED_WAITING :
    at java.lang.Thread.sleep(Native Method)
    at com.exe4j.Controller$StartupThread.run(Unknown Source)

    Thread[GarbageCollectionNotifier,6,main] WAITING :
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at com.biomatters.geneious.publicapi.utilities.GarbageCollectionNotifier$1.run(GarbageCollectionNotifier.java:49)

    Thread[Biomatters-Timer-Thread,5,main] TIMED_WAITING :
    at java.lang.Thread.sleep(Native Method)
    at com.biomatters.iseek.license.TimerThread.run(TimerThread.java:49)

    Thread[Thread-1,6,system] RUNNABLE :
    at sun.awt.windows.WToolkit.shutdown(Native Method)
    at sun.awt.windows.WToolkit.access$200(Unknown Source)
    at sun.awt.windows.WToolkit$2$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Thread[Signal Dispatcher,9,system] RUNNABLE :

    Thread[TimerQueue,5,system] TIMED_WAITING :
    at java.lang.Object.wait(Native Method)
    at javax.swing.TimerQueue.postExpiredTimers(Unknown Source)
    at javax.swing.TimerQueue.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Thread[main,5,main] RUNNABLE :

    Thread[AWT-Windows,6,main] RUNNABLE :
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Thread[Timer: UpdatingProperties - customBlast.properties,5,main] TIMED_WAITING :
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

    Thread[Reference Handler,10,system] WAITING :
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

    Thread[Biomatters-Timer-Thread,5,main] TIMED_WAITING :
    at java.lang.Thread.sleep(Native Method)
    at com.biomatters.iseek.license.TimerThread.run(TimerThread.java:49)

    Thread[AWT-Shutdown,5,main] WAITING :
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Thread[Multicast Reader,5,main] TIMED_WAITING :
    at java.lang.Thread.sleep(Native Method)
    at com.biomatters.iseek.license.concurrentlicensechecker.Multicast$1.run(Multicast.java:150)

    Thread[Finalizer,8,system] WAITING :
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

    Thread[Java2D Disposer,10,system] BLOCKED :
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at sun.java2d.Disposer.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Thread[Do exit,6,main] BLOCKED :
    at java.lang.Shutdown.exit(Unknown Source)
    at java.lang.Runtime.exit(Unknown Source)
    at java.lang.System.exit(Unknown Source)
    at com.biomatters.iseek.application.ISeekFrame$11.run(ISeekFrame.java:560)

    Thread[Memory Monitor,1,main] TIMED_WAITING :
    at java.lang.Thread.sleep(Native Method)
    at com.biomatters.utilities.MemoryMonitor$1.run(MemoryMonitor.java:44)
    at java.lang.Thread.run(Unknown Source)

    Thread[Timer: refresh plugin licenses,5,main] TIMED_WAITING :
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

    Thread[Attach Listener,5,system] RUNNABLE :
4

1 回答 1

2

我有同样的问题,与 JDK 一起部署的 JConsole 程序也是如此。我正在寻找有关此的解决方案或错误报告,但它是从 1.6.0_25 开始的回归。以前的版本不会出现这个问题(我使用 1.6.0_23 成功)。

这个论坛帖子是我找到这个解决方法的地方:

https://forums.oracle.com/forums/thread.jspa?threadID=2260059

于 2013-05-21T16:28:53.607 回答