Project

General

Profile

Bug #5031

concurrency bug in GuiWebSocket.hoverableWidgets and drawingOps

Added by Constantin Asofiei over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Constantin Asofiei over 3 years ago

GuiWebSocket.sendPendingDrawingOps() is called from another thread, and the hoverableWidgets and drawingOps lists are being populated from the main thread. This can result in ConcurrentModificationException:

Exception in thread "WebRepaint" java.util.ConcurrentModificationException
        at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
        at java.util.LinkedList$ListItr.next(LinkedList.java:888)
        at com.goldencode.p2j.ui.client.gui.driver.web.GuiWebSocket.sendPendingDrawingOps(GuiWebSocket.java:1858)
        at com.goldencode.p2j.ui.client.gui.driver.web.GuiWebEmulatedWindow.drawOnScreenBitmap(GuiWebEmulatedWindow.java:884)
        at com.goldencode.p2j.ui.client.gui.driver.web.GuiWebDriver$RepaintThread.run(GuiWebDriver.java:2384)

#2 Updated by Greg Shah over 3 years ago

Do you have a recreate?

#3 Updated by Constantin Asofiei over 3 years ago

It was found in a customer app, during debugging - if you place a breakpoint in GuiWebSocket.sendPendingDrawingOps and another in either deregisterWidget, registerHoverableWidget or addDrawingOp you will see it.

Also available in: Atom PDF