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.

Bug 36316 - CME in core.execution.WindowTable
Summary: CME in core.execution.WindowTable
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Execution (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2003-09-27 01:19 UTC by _ tboudreau
Modified: 2008-12-22 18:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch which could prevent the problem (1.33 KB, patch)
2003-09-29 11:58 UTC, David Konecny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2003-09-27 01:19:36 UTC
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
Comment 1 David Konecny 2003-09-29 11:58:56 UTC
Created attachment 11736 [details]
patch which could prevent the problem
Comment 2 David Konecny 2003-09-29 12:02:03 UTC
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.
Comment 3 _ tboudreau 2003-10-06 11:26:38 UTC
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.
Comment 4 Marian Mirilovic 2004-01-14 15:25:26 UTC
changing owner dkonecny -> pnejedly
Comment 5 Petr Nejedly 2004-08-16 10:16:08 UTC
*** Issue 47194 has been marked as a duplicate of this issue. ***
Comment 6 Petr Nejedly 2004-08-17 16:54:21 UTC
Internal execution not supported anymore...
Comment 7 Marian Mirilovic 2005-12-22 15:09:56 UTC
closed