Bug 190424 - AssertionError at org.netbeans.spi.project.support.ant.AntProjectHelper.save
AssertionError at org.netbeans.spi.project.support.ant.AntProjectHelper.save
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Ant Project
6.x
All All
: P3 (vote)
: 7.0
Assigned To: Jesse Glick
issues@projects
EXCEPTIONS_REPORT
: RANDOM, THREAD
Depends on: 57748
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo