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.
Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Windows Vista, 6.0, amd64 User Comments: vieiro: Again, closing a project akrasny: On change host in CND vieiro: Closing a module project (inside a module suite) sreque: I closed a C project. There were no remaining open projects. Stacktrace: java.lang.ClassCastException: org.netbeans.modules.cnd.makeproject.MakeProject at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:285) at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:597) at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:587) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:586) at org.netbeans.modules.cnd.makeproject.api.configurations.MakeConfigurationDescriptor.ConfigurationProjectXMLWriter(MakeConfigurationDescriptor.java:622)
Created attachment 79958 [details] stacktrace
Possibly due to an attempt to save a project still inside its constructor?
same exception on saving NbModuleProject, so probably not related to CND at all http://statistics.netbeans.org/exceptions/exception.do?id=126091 http://statistics.netbeans.org/exceptions/exception.do?id=126093 somehow project disappeared from AntBasedProjectFactorySingleton.project2Helper collection => couldn't be find on saveProject call: public void saveProject(Project project) throws IOException, ClassCastException { Reference<AntProjectHelper> helperRef = project2Helper.get(project); if (helperRef == null) { throw new ClassCastException(project.getClass().getName()); } ........ Btw, do not see, any project2Helper.remove calls. May be it's worth to extend exception message and print content of project2Helper map with hash codes of entries + hash code of input parameter
re# "Possibly due to an attempt to save a project still inside its constructor?" in cnd related stacks I see exception on saving during close project + saving on project property change, nothing in construction phase, so project should be in list of opened projects
Probably nothing to be done for now except improve diagnostic message, unless it is known how to reproduce.
Anybody able to reproduce the issue? On current dev build? Only project types in those reports are apisupport project and CND project.
even if it is not reproducible, could you, please, extend error message information with I suggested (content of project2Helper map with hash codes of entries + hash code of input parameter) Btw, it could be related to non symmetric equals between real project and lazy project. See OpenProjects.isProjectOpen which uses double equals check
Better diagnostic message will be printed in the exception. http://hg.netbeans.org/cdev/rev/73533aefffb7
Integrated into 'main-golden', will be available in build *200905130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/73533aefffb7 User: Milan Kubec <mkubec@netbeans.org> Log: #162491: better diagnostic message