-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0
In Toolkit.firePulse() we iterate over scenePulseListeners. Inside those listeners it is not uncommon to call user code. That user code may doing things like show a Popup() that causes "scenePulseListeners" to change causing this exception.
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:266)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:353)
at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:289)
My recommendation is to change "scenePulseListeners" from a HashSet to a CopyOnWriteArraySet as that should have minimal effect on performance while making this correct.
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:266)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:353)
at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:289)
My recommendation is to change "scenePulseListeners" from a HashSet to a CopyOnWriteArraySet as that should have minimal effect on performance while making this correct.
- duplicates
-
JDK-8114005 NodeMenuItem: ConcurrentModificationException
-
- Closed
-