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 34436 - ConcurrentModificationException on resource file editing
Summary: ConcurrentModificationException on resource file editing
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jan Stola
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2003-06-17 20:17 UTC by _ proxity
Modified: 2005-07-19 09:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log (143.32 KB, text/plain)
2003-06-17 20:18 UTC, _ proxity
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ proxity 2003-06-17 20:17:19 UTC
I added a new key to my ApplicationResources and
received this:
java.util.ConcurrentModificationException
        at
java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
        at
java.util.HashMap$ValueIterator.next(HashMap.java:792)
        at
org.netbeans.modules.properties.BundleStructure.buildKeySet(BundleStructu

[...]

I have this 3 column layout in the resource editor
for key, default language, and german locale.
Only one window was used to edit the file.
Comment 1 _ proxity 2003-06-17 20:18:08 UTC
Created attachment 10706 [details]
ide.log
Comment 2 pzajac 2003-06-18 09:29:41 UTC
reassigned to properties
Comment 3 Marian Petras 2003-10-07 10:51:16 UTC
Accepted - the exception should not be thrown.
Comment 4 _ proxity 2004-04-20 17:04:19 UTC
Marian, this Exception here happened again today, after the second
Exception I described in bug #42164.
I've got now a SMP machine, so thread sync issues might happen more
often. But since this bureport here is pretty old, I's clear that it
also happened on my old single CPU machine.
Comment 5 Marian Petras 2004-04-20 17:42:00 UTC
Thank you for the important information. I just added a comment to the
other bug report.
Comment 6 _ proxity 2004-05-06 19:51:53 UTC
The exception happened again with v3.6 with a similar stack trace. In
the meanwhile I've got a default locale, and four more (de, en, fr,
nl). Please fix it.

Annotation: Exception occurred in Request Processor
java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
	at java.util.HashMap$ValueIterator.next(HashMap.java:812)
	at
org.netbeans.modules.properties.BundleStructure.buildKeySet(BundleStructure.java:398)
	at
org.netbeans.modules.properties.BundleStructure.notifyOneFileChanged(BundleStructure.java:496)
	at
org.netbeans.modules.properties.PropertiesStructure.structureChanged(PropertiesStructure.java:272)
	at
org.netbeans.modules.properties.PropertiesStructure.update(PropertiesStructure.java:99)
	at
org.netbeans.modules.properties.StructHandler.updatePropertiesStructure(StructHandler.java:180)
	at
org.netbeans.modules.properties.StructHandler.reparseNowBlocking(StructHandler.java:86)
	at
org.netbeans.modules.properties.StructHandler.reparseNowBlocking(StructHandler.java:65)
	at
org.netbeans.modules.properties.StructHandler$1.run(StructHandler.java:145)
	at org.openide.util.Task.run(Task.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
Comment 7 _ proxity 2004-07-20 11:50:53 UTC
This bug happens at least on every third edit on my SMP machine.
We have got 4 languages and the default properties file in the
properties editor, so 5 columns in total. It's quite unusable now.
Comment 8 Jan Stola 2004-07-21 10:01:36 UTC
It seems that the exception is caused by a missing synchronization
of the method BundleStructure.buildKeySet(). When more locales
are modified at once (e.g. when key is added/modified)
the modifications can interfere and result in this exception.
I didn't tried that on SMP machine, but I was able to reproduce
the exception on machine with hyperthreding. The exception
disappeared when the mentioned synchronization was added.
Comment 9 _ proxity 2004-07-21 10:40:44 UTC
Tnx, sounds good.
Comment 10 _ proxity 2004-11-08 16:31:29 UTC
Still no update for 3.6 for fixing this. When will there be an update?
Comment 11 Max Sauer 2005-07-19 09:02:54 UTC
I've tryed on a 2cpu AMD Optetron and cannot reproduce. It a more than 1 year
old issue against 3.6, therefore I'm closing this. [200507181000]