Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 67001 - AIOOBE from AntBasedProjectFactorySingleton.loadProject; parallel calls to ProjectManager.createProject
AIOOBE from AntBasedProjectFactorySingleton.loadProject; parallel calls to Pr...
Product: projects
Classification: Unclassified
Component: Generic Infrastructure
PC Windows XP
: P3 (vote)
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2005-10-18 02:32 UTC by frankioski
Modified: 2009-07-31 21:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

Segment copied from ...\.netbeans\5.0beta\var\logmessage.log (24.30 KB, text/plain)
2005-10-18 02:33 UTC, frankioski

Note You need to log in before you can comment on or make changes to this bug.
Description frankioski 2005-10-18 02:32:04 UTC
1. Installed new 5.0 Beta (using JDK 5.0)
2. Start up 5.0 Beta
3. Answered "Yes" to import of settings from previous NetBeans version (4.1)
4. Encountered NumberFormatException (error dialog pop-up)
5. Made additional entries into issue 66157
6. Exited error dialog
7. Closed projects that came from previous NetBeans 4.1 (wanted to allow those
projects to continue being accessible by 4.1)
8. Attempted to open "nb_all" project for the first time using 5.0 Beta (to
experiment with NetBeans Platform)
9. Encountered java.lang.ArrayIndexOutOfBoundsException (see attached message.log)
Comment 1 frankioski 2005-10-18 02:33:44 UTC
Created attachment 26048 [details]
Segment copied from ...\.netbeans\5.0beta\var\logmessage.log
Comment 2 frankioski 2005-10-18 02:55:03 UTC
Correction of Description:
I should have said in step 8 that I was trying to open the "nbbuild" project
under "nb_all".
Comment 3 _ lcincura 2005-10-24 13:38:04 UTC
Reassigning for evaluation
Comment 4 Radko Najman 2005-10-25 09:42:02 UTC
I don't understand why this issue was reassigned to web project.
ArrayIndexOutOfBoundsException goes from freeform, I don't see anything related
to web project in the attached stack trace (there has been filed a separate
issue #66157 for NFE).
Comment 5 Jan Lahoda 2005-10-25 16:29:56 UTC
I think it belongs into ant/project.
Comment 6 Jesse Glick 2005-10-25 22:56:23 UTC
Sorry, I was looking at the NumberFormatException. ant/project is correct.

No idea what could cause this. JDK bug? Race condition? I can't see how, unless
loadProject is being called from multiple threads, which AFAIK should be
impossible since ProjectManager is supposed to serialize loads.
Comment 7 Jan Lahoda 2005-10-27 12:29:13 UTC
Unfortunatelly, currently the ProjectManager allows to load two indepent project
concurrently (for example /tmp/prj1 and /tmp/prj2 projects can be load
concurrently). I have a sketch of test that proves it. I guess I should fix the
ProjectManager to serialize loading of the projects, right?
Comment 8 Jesse Glick 2005-10-27 19:45:51 UTC
I think it could be a general problem for PM to load two projects in parallel,
even with different directories. Consider that the constructor of each project
might try to call loadProject on the other's dir. Look at issue #60073 at the
same time - should not be forbidden for lP(A) to call lP(B) but if lp(B) tries
to call lP(A) then PM should throw an ISE. If the check for this condition can
be done just as well in parallel (i.e. lP(A) starts in thread T1, lP(B) starts
in T2, lP(A) calls lP(B) and blocks T1, lP(B) calls lP(A) and throws ISE,
unblocking both T2 and T1) then parallel loading should be no problem; but it
may be simpler to just serialize all project loads unconditionally.
Comment 9 Milos Kleint 2008-02-27 09:26:55 UTC
well, isn't the problem in the ant project factory that puts stuff in static maps/lists and doesn't guard against
multiple thread access? Access to the shared items should by synchronized IMHO. not sure what the ProjectManager has to
do with this issue.. ->ant
Comment 10 Jesse Glick 2008-02-27 19:44:48 UTC
As I wrote in my previous comment, I would expect ProjectManager to serialize project loads, which would mean the bug is
in ProjectManager, not ABPFS.
Comment 11 Jesse Glick 2009-07-08 00:43:28 UTC
I can look at it again.
Comment 12 Jesse Glick 2009-07-31 21:47:27 UTC
No further reports of this exception that I know of. Anyway ProjectManager _does_ serialize loads.

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