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 190424 - AssertionError at org.netbeans.spi.project.support.ant.AntProjectHelper.save
Summary: AssertionError at org.netbeans.spi.project.support.ant.AntProjectHelper.save
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM, THREAD
Depends on: 57748
Blocks:
  Show dependency tree
 
Reported: 2010-09-17 15:20 UTC by Vladimir Kvashin
Modified: 2010-09-21 03:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 172605


Attachments
stacktrace (7.42 KB, text/plain)
2010-09-17 15:20 UTC, Vladimir Kvashin
Details
Proposed fix; it seems it fixed the issue (877 bytes, patch)
2010-09-17 20:12 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2010-09-17 15:20:22 UTC
This issue was reported manually by vkvashin.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build 100917-1308a295ea8c)
VM: Java HotSpot(TM) Server VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: SunOS

User Comments:
vkvashin: From time to time, when creating a C/C++ project from existent files, I get an exception.
This isn't 100% repeatable, but occurs approximately each 3-4 time.

My guess is  that the possible reason is that AntProjectHelper.pendingHook is cleared in finally block, without synchronization, so a thread can enter the line where assertion occurs just before another thread cleared pendingHook.




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:602)
   at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:108)
   at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:146)
   at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:438)
   at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:647)
   at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:638)
Comment 1 Vladimir Kvashin 2010-09-17 15:20:27 UTC
Created attachment 102061 [details]
stacktrace
Comment 2 Vladimir Kvashin 2010-09-17 20:12:16 UTC
Created attachment 102065 [details]
Proposed fix; it seems it fixed the issue
Comment 3 Vladimir Kvashin 2010-09-20 10:49:26 UTC
This is really boring. I now have to run IDE on 8-processors machine and this occurs pretty often.

I've just pushed my fix into cnd-main:
http://hg.netbeans.org/cnd-main/rev/c11da36fb82a
Comment 4 Jesse Glick 2010-09-20 16:50:31 UTC
Fix is probably wrong; seem to be missing full synchronization on these fields. It is possible all this code could anyway be deleted (cf. bug #57748).
Comment 5 Quality Engineering 2010-09-21 03:12:04 UTC
Integrated into 'main-golden', will be available in build *201009210000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c11da36fb82a
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #190424 AssertionError