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)
Created attachment 26048 [details]
Segment copied from ...\.netbeans\5.0beta\var\logmessage.log
Correction of Description:
I should have said in step 8 that I was trying to open the "nbbuild" project
Reassigning for evaluation
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).
I think it belongs into ant/project.
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.
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?
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.
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
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.
I can look at it again.
No further reports of this exception that I know of. Anyway ProjectManager _does_ serialize loads.