This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I was running a program with internal execution; when I closed it, the following exception occured (I ran it many times before this with no problems) *********** Exception occurred ************ at Sat Sep 27 02:16:48 CEST 2003 java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:4 48) at java.util.AbstractList$Itr.next(AbstractList.java:419) at org.netbeans.core.execution.WindowTable.closeGroup(WindowTable.java:7 5) at org.netbeans.core.execution.ExecutionEngine.closeGroup(ExecutionEngin e.java:222) [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:13 9) Warning - org.netbeans.core.execution.ProcessNodeItem$TerminateProcessAction sho uld override CallableSystemAction.asynchronous() to return false
Created attachment 11736 [details] patch which could prevent the problem
The WindowTable.windowMap is not synchronized properly. I attached simple patch adding sychronized keyword to methods modifying this variable which should prevent it. But I do not understand what the code itself does in core/execution so I a bit hesitate to commit it.
More info on how to reproduce: - Create a main class that will - Create two JFrames - Attach listeners to each one, each of which will call System.exit(0) when the window is closed Run it with internal execution Close one or both windows (note also that closing one does not close the other, as it would with external execution - there's the underlying problem). You could leave this issue if we do plan to get rid of Internal Execution as a general feature. Probably also you could just not use Iterator, but that's really just hiding the bug and praying - synchronization is needed. What about just changing the code that constructs the list to something like List myList = Collections.synchronizedList(new ArrayList()) or whatever - it should be safe, and you can probably keep all the modifications in one place.
changing owner dkonecny -> pnejedly
*** Issue 47194 has been marked as a duplicate of this issue. ***
Internal execution not supported anymore...
closed