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.
Product Version: NetBeans IDE Dev (Build 200806230002) Java: 1.6.0_05; Java HotSpot(TM) Client VM 11.0-b11 Steps to reproduce: Delete NetBeans workdir before run it. Import limewire project into Netbeans. The exceptions are thrown: java.lang.AssertionError and java.lang.IllegalArgumentException: NB_REPORTER_IGNORE: Project limewire is not open and cannot be set as main. (See full stacktrace in attach) Project is created and classpaths is scanning but not opened in Netbeans.
Created attachment 63244 [details] Exceptions stacktrace for this issue
I randomly can see this exception but I'm not sure what's causing it. Try import again and it most probably will pass - that's my experience.
Created attachment 63792 [details] two exceptions: assert and its cause
Jesse, what's your opinion on this one? I added a logging to ProjectProperties$PP.diskChange() to see who is changing the file and reproduced the problem (I was lucky). I was expecting to get two stack traces where one of them is not properly using PM.MUTEX.writeAccess and that will be it. But as you can see on attached file (I was not lucky in this case) both of the stack traces are run under writeAccess. How is it possible that PP is altered by both of them? My only explanation is that file change events (thread-1) are actually fired outside of writeAccess allowing other thread (thread-2) to enter writeAccess and start changing it and later thread-1 resets loaded flag causing even later thread-2 to throw the assert. Synchronization of Importer and ImportProjectAction was slightly wrong allowing ImportProjectAction to start opening projects while Importer was still in writeAccess (see removal of Importer.done variable in next commit). But because J2SEProject open hook runs under write access it still should not result into this assert. Different idea: perhaps ProjectProperties$PP.write() should not assert loaded == true but remember timestamp of loaded properties (or null if file did not exist) and in write assert that timestamp has not changed or in case of null timestamp assert that file still does not exist on disk.
Yeah, I think the threading logic in PP is wrong. For one thing, it should probably be using FileEvent.firedFrom to ignore disk changes fired when it is writing, rather than relying on the fluid variable 'writing'. Regarding the 'loaded' variable, responsible for this assertion, I'm not sure exactly what is going on; looks like a disk change is arriving while modifications are being done in memory?
*** Issue 128618 has been marked as a duplicate of this issue. ***
This issue already has 50 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=20000
Build: NetBeans IDE Dev (Build 200904220201) VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Linux, 2.6.28-11-generic, amd64 User Comments: creating a sample project Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 80721 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904192254) VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Linux, 2.6.27-11-generic, amd64 User Comments: creating ServletExamples project from Samples Projects Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 80764 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904192254) VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Linux, 2.6.27-11-generic, amd64 User Comments: changing server in run configuration from Tomcat to Glassfish Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 80783 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904242137) VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284 OS: Mac OS X, 10.5.6, i386 User Comments: Renaming a project - Web project Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 81811 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904242137) VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284 OS: Mac OS X, 10.5.6, i386 User Comments: Copying a web project and naming it something different. Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 81815 [details] stacktrace
Build: NetBeans IDE Dev (Build 090507) VM: Java HotSpot(TM) Client VM, 1.5.0_16-b02, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b02 OS: Linux, 2.6.24-24-generic, i386 User Comments: after debugger started Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:217) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 82060 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904242137) VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284 OS: Mac OS X, 10.5.7, i386 User Comments: Opening a saved project Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:219) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:337)
Created attachment 82855 [details] stacktrace
Build: NetBeans IDE 6.7 RC3 (Build 200906142201) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Windows XP, 5.1, x86 User Comments: running the project in <default configuration> right after deleting some other configuration (the project scanning probably did not end) Stacktrace: java.lang.AssertionError at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:217) at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:134) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:595) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:102) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:140) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:346)
Created attachment 83675 [details] stacktrace
I can look at it.
Improved some things in core-main #2645ec389548 & core-main #8162a3e2eaac which at a minimum should downgrade the problem to an IOException. If this continues to be thrown, can attempt to diagnose further.
Integrated into 'main-golden', will be available in build *200906251410* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2645ec389548 User: Jesse Glick <jglick@netbeans.org> Log: Prep for #137947: use FileEvent.firedFrom in preference to fluid variables.