DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40681

           Summary: Race condition causes IllegalStateException from
                    JSVGComponent.dispose()
           Product: Batik
           Version: 1.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bridge
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Randomly and rarely I see this exception trace:

     [java] Exception in thread "AWT-EventQueue-0"
java.lang.IllegalStateException: RunnableQueue not started or has exited
     [java]     at org.apache.batik.util.RunnableQueue.preemptLater(Unknown 
Source)
     [java]     at org.apache.batik.bridge.UpdateManager.interrupt(Unknown 
Source)
     [java]     at
org.apache.batik.swing.svg.JSVGComponent.stopProcessing(Unknown Source)
     [java]     at org.apache.batik.swing.svg.JSVGComponent.stopThenRun(Unknown
Source)
     [java]     at
org.apache.batik.swing.svg.JSVGComponent.setSVGDocument(Unknown Source)
     [java]     at org.apache.batik.swing.svg.JSVGComponent.dispose(Unknown 
Source)
     [java]     at
com.awarix.trak.client.svg.KeylessJSVGCanvas.dispose(KeylessJSVGCanvas.java:37)
     [java]     at
com.awarix.trak.client.svg.SVGLoadManager$1.run(SVGLoadManager.java:317)
     [java]     at 
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     [java]     at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     [java]     at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     [java]     at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     [java]     at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     [java]     at 
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

This appears to be caused by a race condition in UpdateManager.java. It checks
for updateRunnableQueue.getThread() == null, and if not, then calls
updateRunnableQueue.preemptLater(). But in between these two calls, the
RunnableQueue thread could have exited. This appears to be the only possible way
for this exception to occur.

The attached patch "should" fix this bug. However, I have not verified that this
patch doesn't introduce a possible deadlock (I don't think it would but have not
analyzed the code for that possibility; someone more familiar may be able to
quickly check this).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to