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 142938 - [65cat] AssertionError: Expecting a Project reference for AntProjectHelper[C:\src\Java\G4AutoRegistration]
Summary: [65cat] AssertionError: Expecting a Project reference for AntProjectHelper[C:...
Status: RESOLVED DUPLICATE of bug 146852
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kubec
: 142939 (view as bug list)
Depends on:
Reported: 2008-08-05 15:26 UTC by ranbato
Modified: 2009-02-19 20:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 86725

stacktrace (2.04 KB, text/plain)
2008-08-05 15:26 UTC, ranbato
Zipped Project with issue (20.26 KB, application/x-compressed)
2008-08-07 15:04 UTC, ranbato

Note You need to log in before you can comment on or make changes to this bug.
Description ranbato 2008-08-05 15:26:00 UTC
Build: NetBeans IDE Dev (Build 200808021401)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Windows XP, 5.1, x86

User Comments: 
Opened IDE

java.lang.AssertionError: Expecting a Project reference for AntProjectHelper[C:\src\Java\G4AutoRegistration]
        at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.getProjectFor(
        at org.netbeans.modules.web.project.WebSources$
        at org.openide.util.Mutex.leaveImpl(
Comment 1 ranbato 2008-08-05 15:26:12 UTC
Created attachment 66602 [details]
Comment 2 Milan Kubec 2008-08-06 13:08:40 UTC
Please provide more details about the issue. 
- Is it reproducible for you? 
- Did you somehow modify or delete some projects outside of IDE or when the IDE was not running? 
- Is 'C:\src\Java\G4AutoRegistration' valid NetBeans project?
- Are you able to open project 'C:\src\Java\G4AutoRegistration' separately?
Comment 3 ranbato 2008-08-07 15:04:21 UTC
Created attachment 66825 [details]
Zipped Project with issue
Comment 4 ranbato 2008-08-07 15:06:51 UTC
I have attached the project.  It was created fresh with a daily from last week.  It was working for a day or two and
then entered this state.  I removed the build and dist folders to reduce the size (6MB) but they are there from the last
time I was able to open it.

I was working on in one day, saved and shut down, and was unable to enter it the next morning.
Comment 5 Milan Kubec 2008-08-07 15:22:23 UTC
Thanks for the info.
Comment 6 Milan Kubec 2008-08-08 12:24:04 UTC
*** Issue 142939 has been marked as a duplicate of this issue. ***
Comment 7 Milan Kubec 2008-08-08 12:26:09 UTC
Preevaluation from Milos:

It seems to be related to line 197 in AntBasedProjectFactorySingleton

        AntProjectHelper helper = HELPER_CALLBACK.createHelper(projectDirectory, projectXml, state, provider);
        Project project = provider.createProject(helper);
        project2Helper.put(project, new WeakReference<AntProjectHelper>(helper));
        synchronized (helper2Project) {
            helper2Project.put(helper, new WeakReference<Project>(project));

the helper2project map is populated after provider.createProjects(helper), I guess under some circumstances some other
code can access the Factory singleton from code spawned by provider.createProject(helper) content.
Comment 8 Jesse Glick 2008-08-08 14:38:12 UTC
I think there is another bug in ant/project similar if not identical to this one.
Comment 9 Jesse Glick 2009-01-09 18:06:17 UTC

*** This issue has been marked as a duplicate of 146852 ***