Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.5.2
-
Component/s: Taverna GUI
-
Labels:None
Description
It is possible to (dead) lock up the GUI if the SVG diagram is updated too fast, such as quickly switching diagrams in Logbook.
"Timer-29" prio=6 tid=0x00577b20 nid=0x19bf800 in Object.wait() [0xb1193000..0xb1193d10]
at java.lang.Object.wait(Native Method)
- waiting on <0x1813a310> (a java.awt.EventQueue$1AWTInvocationLock)
at java.lang.Object.wait(Object.java:474)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:846)- locked <0x1813a310> (a java.awt.EventQueue$1AWTInvocationLock)
at org.apache.batik.swing.svg.JSVGComponent$BridgeUserAgentWrapper.invokeAndWait(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent$BridgeUserAgentWrapper.getXMLParserClassName(Unknown Source)
at org.apache.batik.bridge.DocumentLoader.<init>(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent.createBridgeContext(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent.installSVGDocument(Unknown Source)
at org.apache.batik.swing.JSVGCanvas.installSVGDocument(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent$2.run(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent.stopThenRun(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent.setSVGDocument(Unknown Source)
at org.embl.ebi.escience.scuflui.ScuflSVGDiagram.updateGraphic(ScuflSVGDiagram.java:224)- locked <0x1d34e728> (a org.embl.ebi.escience.scuflui.ScuflSVGDiagram)
at org.embl.ebi.escience.scuflui.ScuflSVGDiagram$UpdateTimer.run(ScuflSVGDiagram.java:208)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)(..)
"AWT-EventQueue-0" prio=6 tid=0x00510900 nid=0x183dc00 waiting for monitor entry [0xb0f8f000..0xb0f8fd10]
at org.embl.ebi.escience.scuflui.ScuflSVGDiagram.detachFromModel(ScuflSVGDiagram.java:185)
- waiting to lock <0x1d34e728> (a org.embl.ebi.escience.scuflui.ScuflSVGDiagram)
at org.embl.ebi.escience.scuflui.ScuflDiagramPanel.detachFromModel(ScuflDiagramPanel.java:302)
at uk.org.mygrid.logbook.ui.ProcessRunsPane.updateWorkflowModel(ProcessRunsPane.java:272)
at uk.org.mygrid.logbook.ui.LogBookUI$2.mouseClicked(LogBookUI.java:343)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
at java.awt.Component.processMouseEvent(Component.java:5557)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5319)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4021)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3945)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Here ScuflSVGDiagram.updateGraphics() locks the ScuflSVGDiagram for too long, causing trouble for ScuflSVGDiagram.detachFromModel() which also needs to lock the ScuflSVGDiagram.
Since the updateGraphics() eventually makes a call to invokeLater() that hangs while the actual GUI thread (which is in detachFromModel after a user clicked on another model) is waiting for the lock held by the updateGraphics.
Issue Links
| Depends | |||
|---|---|---|---|
|
|||
Avoid heavy synchronization on updateGraphic, added a little 'updating' boolean that prevents double updates instead.