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.
For some reason one of my old projects become corrupted and now I get "Errors while reading XML from Application_1" every time I open this project. The problem seem to be in corrupted configurations.xml which contains empty <confs> block i.e. project has no configurations. I do not know why and how it happened (for sure I did not remove configurations by hand from the xml file :) Now I'm unable to create a new configuration in this project: when I go to project properties I get the exception: java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603) at org.netbeans.modules.cnd.makeproject.ui.customizer.MakeCustomizer.<init>(MakeCustomizer.java:144) at org.netbeans.modules.cnd.makeproject.api.MakeCustomizerProvider.showCustomizerWorker(MakeCustomizerProvider.java:175) at org.netbeans.modules.cnd.makeproject.api.MakeCustomizerProvider.access$000(MakeCustomizerProvider.java:76) at org.netbeans.modules.cnd.makeproject.api.MakeCustomizerProvider$1.run(MakeCustomizerProvider.java:119) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Created attachment 72594 [details] xml file from the corrupted project
Because We doesn't know reason, bug can't be fixed in 6.5FCS
The attachment is not working for me. Please re-attach the project (not just the xml file).
Created attachment 72737 [details] full project
same thing reproduced on Windows
Created attachment 72751 [details] another corrupted project
I get it almost every day even with new projects... Rasing priority to P2.
Created attachment 72781 [details] another corrupted project
The configuration block is empty: <projectmakefile>Makefile</projectmakefile> <confs> </confs> It can only happen if configuration size is zero (!) in the code below (CommonConfigurationXMLCodec.java): 308 Configurations confs = projectDescriptor.getConfs(); 309 for (int i = 0; i < confs.size(); i++) { and I don't understand how this can happen. Questions: 1) Is it reproducible? 2) What steps leads up to this? It could be some kind of a race condition. I will ask Alexander S. for an evaluation. He has recently reworked how projectdescriptor get read.
One more question: 3) Any exceptions in log file?
Thomas, could you please evaluate this issue for showstopper status.
IMHO it is a bug in 7.0 To check my guess try to reproduce bug in RC1
Answers to questions: 1) Is it reproducible? No, it happens from time to time 2) What steps leads up to this? Create a project, then do usual thing - debug, change something, then close and open IDE 3) Any exceptions in log file? None
See steps in 151685. Create new file in project in first 9 seconds after creating. NPE: SEVERE [org.openide.util.RequestProcessor] java.lang.NullPointerException at org.netbeans.modules.cnd.makeproject.api.configurations.ConfigurationDescriptorProvider.recordMetrics(ConfigurationDescriptorProvider.java:238) at org.netbeans.modules.cnd.makeproject.configurations.ConfigurationXMLReader._read(ConfigurationXMLReader.java:195) at org.netbeans.modules.cnd.makeproject.configurations.ConfigurationXMLReader$1.run(ConfigurationXMLReader.java:112) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) So all actions items that use configuration descriptor should check ConfigurationDescriptorProvider.gotDescriptor()
With the assertion added to ConfigurationXMLWriter (line 74) it is impossible to create new project now. I get the assertion every time I try to create a project. The project is not initialized correctly, it's empty and can only be closed.
Integrated into 'main-golden', will be available in build *200810300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6fa8ce9f97d2 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing: IZ#151273:Corrupted configurations.xml
Changes for IZ#146696 was rolled back. It fixed the bug.