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 66438 - Exception on startup
Summary: Exception on startup
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 06:57 UTC by _ tboudreau
Modified: 2008-12-23 00:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (10.43 KB, text/plain)
2005-10-11 06:57 UTC, _ tboudreau
Details
Module suite that reproduces the problem (use unzip -a if unzipping on unix to convert line terminators) (214.45 KB, application/x-compressed)
2005-10-12 19:51 UTC, _ tboudreau
Details
The stack overflow error - easily reproduced, just run IDE on fresh UD, shut down, restart (thanx to Trung for finding) (78.98 KB, text/plain)
2005-11-08 22:36 UTC, Jesse Glick
Details
The important part of the log showing the collision between two threads (21.11 KB, text/plain)
2005-11-23 08:38 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2005-10-11 06:57:04 UTC
Running a platform app with a minimal set of NB modules (see log), clean start
is fine, but on restart, the exception in the log is thrown and startup halts.  

Not sure what to make of it, but there's none of my code involved, so perhaps
this can happen to the IDE too?  Everything in the stack trace after
core.Main.start() is openide.

The previous shutdown left two custom TopComponents open - an explorer view of a
folder in SFS and a custom TopComponent associated with the single DataObject in
the SFS folder.

Note that core/ui is disabled, which is a little unusual.
Comment 1 _ tboudreau 2005-10-11 06:57:59 UTC
Created attachment 25778 [details]
log
Comment 2 Jaroslav Tulach 2005-10-11 08:03:02 UTC
Tim, please attach something to make it easier to reproduce the problem. I am 
not going to spend hours trying to get the same configuration you have. 
Comment 3 _ tboudreau 2005-10-12 19:49:54 UTC
Will attach a demo.  It's a small paint program.  Shut down NB with a couple
image windows open, and restart a few times and you should see the same thing.
Comment 4 _ tboudreau 2005-10-12 19:51:15 UTC
Created attachment 25886 [details]
Module suite that reproduces the problem (use unzip -a if unzipping on unix to convert line terminators)
Comment 5 Jaroslav Tulach 2005-10-20 14:49:48 UTC
I cannot reproduce the problem, I am sorry. I opened few top components and 
tried to restart few times and nothing. Btw. the content is lost after restart 
even if I save a component... 
 
Comment 6 _ tboudreau 2005-10-20 15:16:14 UTC
You could change the persistence type in the TC if you want.

But actually, it may be unrelated to TopComponents anyway.  It seems to be
reproducible randomly, a very small percentage of the time (1 out of maybe 200
startups).

What I'd suggest is, change the persistence type if you want, and just run a
script that will start it over and over again for a weekend.  Go home.  On
Monday, you'll probably have a stalled instance of NetBeans with this problem.

It is real.
Comment 7 Jaroslav Tulach 2005-10-20 19:30:45 UTC
Honza, were not you talking to me about a bug in MIME resolution related to 
AbstractLookup$ISE? Is not this bug the case you were describing? Thanks. 
Comment 8 Jaroslav Tulach 2005-11-08 18:04:29 UTC
A but in MIMESupport I guess. 
 
done 
Checking in 
test/unit/src/org/openide/filesystems/MIMESupportResolversTest.java; 
/cvs/openide/fs/test/unit/src/org/openide/filesystems/MIMESupportResolversTest.java,v  
<--  MIMESupportResolversTest.java 
initial revision: 1.1 
done 
Checking in src/org/openide/filesystems/MIMESupport.java; 
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v  <--  
MIMESupport.java 
new revision: 1.3 
Comment 9 Jesse Glick 2005-11-08 22:35:45 UTC
Sorry, had to rollback; caused a stack overflow on second start of IDE:

Checking in openide/fs/src/org/openide/filesystems/MIMESupport.java;
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v  <-- 
MIMESupport.java
new revision: 1.4; previous revision: 1.3
done
Comment 10 Jesse Glick 2005-11-08 22:36:46 UTC
Created attachment 26725 [details]
The stack overflow error - easily reproduced, just run IDE on fresh UD, shut down, restart (thanx to Trung for finding)
Comment 11 _ ttran 2005-11-08 22:44:31 UTC
See bug 68318
Comment 12 Jaroslav Tulach 2005-11-09 13:17:13 UTC
New fix of MIMESupport that shall work after more restarts. However I still am  
able to generate the exception from time to time. I do not know where is the  
problem, maybe wrong synchronization in XMLDataObject or in entity resolver...  
  
Anyway I'm adding better logging. If you Time, can reproduce the problem  
enable:  
  
-Dorg.openide.loaders.XMLDataObject=-5   
-Dorg.netbeans.core.filesystems=-5  
-Dorg.netbeans.core.xml=-5  
  
and attach output which is generated around the exception, so we can try to  
analyze the reasons that lead to the failure.  
 
 
 
 
 
Checking in core/src/org/netbeans/core/filesystems/MIMEResolverImpl.java; 
/cvs/core/src/org/netbeans/core/filesystems/MIMEResolverImpl.java,v  <--  
MIMEResolverImpl.java 
new revision: 1.16; previous revision: 1.15 
done 
RCS 
file: /cvs/openide/fs/test/unit/src/org/openide/filesystems/MIMESupport68318Test.java,v 
done 
Checking in 
openide/fs/test/unit/src/org/openide/filesystems/MIMESupport68318Test.java; 
/cvs/openide/fs/test/unit/src/org/openide/filesystems/MIMESupport68318Test.java,v  
<--  MIMESupport68318Test.java 
initial revision: 1.1 
done 
Checking in openide/loaders/src/org/openide/loaders/FolderLookup.java; 
/cvs/openide/loaders/src/org/openide/loaders/FolderLookup.java,v  <--  
FolderLookup.java 
new revision: 1.12; previous revision: 1.11 
done 
Checking in openide/fs/src/org/openide/filesystems/MIMESupport.java; 
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v  <--  
MIMESupport.java 
new revision: 1.5; previous revision: 1.4 
 
 
Comment 13 Jaroslav Tulach 2005-11-10 09:53:23 UTC
"#66438: More logging found a race condition. The registerSwitches in 
LoggingTestCaseHid helped to simulate it and fix it. Now the problem shall be 
gone." 
Checking in core/src/org/netbeans/core/xml/FileEntityResolver.java; 
/cvs/core/src/org/netbeans/core/xml/FileEntityResolver.java,v  <--  
FileEntityResolver.java 
new revision: 1.28; previous revision: 1.27 
done 
Checking in openide/loaders/src/org/openide/loaders/XMLDataObject.java; 
/cvs/openide/loaders/src/org/openide/loaders/XMLDataObject.java,v  <--  
XMLDataObject.java 
new revision: 1.22; previous revision: 1.21 
done 
Checking in 
openide/loaders/test/unit/src/org/openide/loaders/LoggingControlTest.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/LoggingControlTest.java,v  
<--  LoggingControlTest.java 
new revision: 1.5; previous revision: 1.4 
done 
Checking in 
openide/loaders/test/unit/src/org/openide/loaders/LoggingTestCaseHid.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/LoggingTestCaseHid.java,v  
<--  LoggingTestCaseHid.java 
new revision: 1.8; previous revision: 1.7 
done 
RCS 
file: /cvs/openide/loaders/test/unit/src/org/openide/loaders/XMLDataObjectGetCookieTest.java,v 
done 
Checking in 
openide/loaders/test/unit/src/org/openide/loaders/XMLDataObjectGetCookieTest.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/XMLDataObjectGetCookieTest.java,v  
<--  XMLDataObjectGetCookieTest.java 
initial revision: 1.1 
 
Comment 14 Jaroslav Tulach 2005-11-23 08:37:39 UTC
I was able to get the exception with logging once again. There is a race 
condition in FileEntityResolver. 
Comment 15 Jaroslav Tulach 2005-11-23 08:38:51 UTC
Created attachment 27175 [details]
The important part of the log showing the collision between two threads
Comment 16 Jaroslav Tulach 2005-11-23 21:10:43 UTC
cvs server: scheduling file `FileEntityResolver66438Test.java' for addition 
cvs server: use 'cvs commit' to add this file permanently 
Checking in 
test/unit/src/org/netbeans/core/xml/FileEntityResolverDeadlock54971Test.java; 
/cvs/core/test/unit/src/org/netbeans/core/xml/FileEntityResolverDeadlock54971Test.java,v  
<--  FileEntityResolverDeadlock54971Test.java 
new revision: 1.3; previous revision: 1.2 
done 
RCS 
file: /cvs/core/test/unit/src/org/netbeans/core/xml/FileEntityResolver66438Test.java,v 
done 
Checking in 
test/unit/src/org/netbeans/core/xml/FileEntityResolver66438Test.java; 
/cvs/core/test/unit/src/org/netbeans/core/xml/FileEntityResolver66438Test.java,v  
<--  FileEntityResolver66438Test.java 
initial revision: 1.1 
done 
Checking in src/org/netbeans/core/xml/FileEntityResolver.java; 
/cvs/core/src/org/netbeans/core/xml/FileEntityResolver.java,v  <--  
FileEntityResolver.java 
new revision: 1.29; previous revision: 1.28