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 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.
Created attachment 10706 [details] ide.log
reassigned to properties
Accepted - the exception should not be thrown.
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.
Thank you for the important information. I just added a comment to the other bug report.
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)
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.
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.
Tnx, sounds good.
Still no update for 3.6 for fixing this. When will there be an update?
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]