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 18967 - java.io.IOException on Startup. Loss of files in editor
Summary: java.io.IOException on Startup. Loss of files in editor
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 3.x
Hardware: PC Windows 95/98
: P1 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
: 17143 18814 18975 19252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-02 03:10 UTC by Phil Sager
Modified: 2008-12-23 13:39 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans ide.log (334.13 KB, text/plain)
2002-01-02 03:12 UTC, Phil Sager
Details
clean log of java.io.IOException (72.89 KB, text/plain)
2002-01-02 19:04 UTC, Phil Sager
Details
Clean log of file system settings corruption. (117.27 KB, text/plain)
2002-01-08 18:09 UTC, Phil Sager
Details
Here is the patch. Should be placed in {nb.userdir}/system/lib/patches (95.32 KB, application/octet-stream)
2002-01-09 19:04 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Sager 2002-01-02 03:10:07 UTC
Starting NB and the editor displays but with only 1 file instead of the 5 or 6 
that I had open when I shutdown the system. A dialog box appeared with 
java.io.IOException appeared.

The last time this happened I lost some of my projects as well as some of my 
filesystem settings in the project within which the problem appeared.
Comment 1 Phil Sager 2002-01-02 03:12:21 UTC
Created attachment 3940 [details]
NetBeans ide.log
Comment 2 Jan Zajicek 2002-01-02 10:33:38 UTC
Problems with settings in windows system.
Comment 3 _ ttran 2002-01-02 16:49:21 UTC
I see in the log

java.lang.NullPointerException
	at
org.netbeans.modules.debugger.support.actions.DebuggerWindowPerformer.getDebuggerWindow(DebuggerWindowPerformer.java:108)
	at
org.netbeans.modules.debugger.support.nodes.DebuggerWindow.readExternal(DebuggerWindow.java:194)


IMO this is a bug in the debuggercore module.  Perhaps the window
system is not robust enough to survive this failure.  I am not sure though
Comment 4 Phil Sager 2002-01-02 19:04:55 UTC
Created attachment 3957 [details]
clean log of java.io.IOException
Comment 5 Phil Sager 2002-01-02 20:24:08 UTC
Additional information: On another occurance of the problem I checked 
my settings and found;
tools/options/building/compiler types

besides the compilers listed, there were 25 lines that read;

SAX Parser

Sure does not sound like a debugger bug to me...
Comment 6 _ ttran 2002-01-03 13:59:26 UTC
> Sure does not sound like a debugger bug to me...

agreed.  I just want to say that the other exceptions _may_ be caused
by the NPE in the debuggercore module.  And as I said before in any
case the window system should be more robust in situations like this
Comment 7 Phil Sager 2002-01-03 15:23:41 UTC
Yes, and I have had debugger problems so the log has probably pointed 
you in a different direction from the description of this problem. 
That is why I added the clean log. 

I have had debugger errors but wrote them off to being caused by 
other things, such as my firewall.
Comment 8 Phil Sager 2002-01-03 19:19:55 UTC
As I am now getting this error everytime I start my project under NB 
I checked the 

folder .../system/projects/argo/system/windows/components 

and found 79 *.settings files....this can't be right, can it?

Can someone tell me how I can prevent this error from happening 
everytime I load my project. If I delete all the files in that 
directory will NB rebuild the correct one (s)? I know that others on 
the user mailing list are having similar errors.
Comment 9 Jan Stola 2002-01-04 09:31:55 UTC
*** Issue 18975 has been marked as a duplicate of this issue. ***
Comment 10 Jan Stola 2002-01-04 13:37:47 UTC
Not reproducible => lowering priority to P3
Comment 11 Jan Jancura 2002-01-04 14:01:46 UTC
I have fixed small problem in debbugger (NPE) related to this report
(release33 branch). But I really belive that debugger is not the
original source of it.
Comment 12 Jiri Kovalsky 2002-01-04 14:42:26 UTC
Lowering priority to original value and asking window system guys for
further investigation.
Comment 13 _ ttran 2002-01-04 15:00:12 UTC
Phil, you can safely delete all those subdirs

{YOUR USERDIR}/system/projects/{YOUR PROJECT}/system/windows

You'll lose all workspace layouts but nothing else (editor settings
for example remain intact)

Please take the 3.3.1-dev nightly build tomorrow and test if it works
for you.  I recommend to explicitly specify a different location for
your userdir, just in case the dev build wants to eat your settings
:-(.  runide.exe -userdir c:\nbuser331 will do.

For now I am closing this one as fixed.  If the problem persists even
with 3.3.1-dev, please reopen.  Thanks
Comment 14 Phil Sager 2002-01-08 18:06:55 UTC
Problem happened again. I had 10 files open and when I tried to 
dismount a file system the unmount failed (probably because I had a 
file in the editor). When I reloaded NB I got warnings about the 
windows file setting being corrupted. Am attaching a clean log.
Comment 15 Phil Sager 2002-01-08 18:09:24 UTC
Created attachment 4018 [details]
Clean log of file system settings corruption.
Comment 16 _ ttran 2002-01-09 08:52:44 UTC
there are actually two separate issues:

1) you failed to unmount a filesystem
   having files opened in the editor should not cause the failure. 
This is the bug.  I don't see any exceptions related to this.  Is it
reproducible?

2) Windows/Components/filesystems.settings is corrupted, at least the
IDE thinks so.  Please attach this file here.  Or better zip your
<userdir>/system/Projects and attach the zip file here.

Thanks

Comment 17 mslama 2002-01-09 10:02:57 UTC
Clearly it is problem of InstanceDataObject so I assign this issue to
jpokorsky.
Comment 18 Jan Pokorsky 2002-01-09 10:36:52 UTC
Phil can you zip your userdir (c:\nbuser331\system is enough) and 
attach to the bug please? Do you remember steps how to reproduce the 
bug? I would very appreciate them. Thanks
Comment 19 Jan Pokorsky 2002-01-09 11:00:09 UTC
*** Issue 18814 has been marked as a duplicate of this issue. ***
Comment 20 Jan Pokorsky 2002-01-09 18:45:07 UTC
<written by Phil>
Hi;
I'm sorry but I cleared out the windows directory just after I 
reopened the problem. I will try to reproduce the error and post the 
info. It has been very
reproduceable up till now. I just have to open 10 or more files and 
then exit NB. When I restart the error happens.
 
I have been able to work by making sure that I never open more than 8 
files at any one time.
 
There was no exception, just a box saying it was trying to unmount the 
filesystem (it had moving dots on it)...I don't remember what I 
answered . I actually
didn't see this box until I was shutting down.
</sent>
Comment 21 Jan Pokorsky 2002-01-09 18:58:18 UTC
Strange! Phil, I've tried to reproduce steps you mentioned using more 
than 300 opened files on two platforms Solaris and w2k without any 
exception :(. It would be greate if you reproduce it again and attach 
your zipped system folder.

I'll prepare a patch trying to solve the problem and dumping more 
debug details to ide.log
Comment 22 Jan Pokorsky 2002-01-09 19:04:00 UTC
Created attachment 4049 [details]
Here is the patch. Should be placed in {nb.userdir}/system/lib/patches
Comment 23 _ ttran 2002-01-10 09:04:21 UTC
> Should be placed in {nb.userdir}/system/lib/patches

WRONG. The location should be {IDEHOME}/lib/patches.  Create the dir
if it's not there and don't forget to delete it after finishing testing.

Comment 24 Jan Pokorsky 2002-01-10 10:51:00 UTC
Here is more info from Phil

> Phil Sager wrote:
> 
> Here is the patch. Should be placed in 
{nb.userdir}/system/lib/patches
> do you mean {nb.userdir}/lib/patches   ???

Sorry it was my typo. You are right.
 
> and do I have to unzip or do anything???

No no just place it there.
 
> and so far I have not been able to reproduce the problem either,
> hmmmm, the only thing I did since then is remove the old version of
> NB3.3.  I wonder if it was interacting somehow ... [;o]

If you did not share same userdir then no.
Comment 25 Jan Pokorsky 2002-01-10 21:21:48 UTC
*** Issue 19252 has been marked as a duplicate of this issue. ***
Comment 26 Jan Pokorsky 2002-01-11 17:59:39 UTC
Phil it is not necessary to reproduce it again. After deep 
investigation I found out some .settings files of the window system 
are scheduled to write down when jvm shutting down. So me and window 
system guys are preparing a fix solving the problem. Thanks for your 
help.
Comment 27 Jan Pokorsky 2002-01-15 14:44:18 UTC
The window system storing is synchronized with the ide session closing 
now. It also helps to solve performence issues (some TopComponents are 
stored too often). Fixed in the trunk:
org/netbeans/core/windows/PersistenceManager.java, v1.23
org/openide/loaders/InstanceDataObject.java, v1.115

Jardo, Dafe can you review the code please?
Comment 28 Lukas Hasik 2002-01-16 09:35:21 UTC
patch verified.
Comment 29 Jan Chalupa 2002-01-16 09:42:02 UTC
Approved by QA.
Comment 30 eadams 2002-01-16 09:47:39 UTC
Approved.
Comment 31 Jan Pokorsky 2002-01-16 14:13:08 UTC
Fixed in the release33 branch:
org/netbeans/core/windows/PersistenceManager.java, v1.20.4.7
org/openide/loaders/InstanceDataObject.java, v1.113.2.6

Phil, you can try today build (16 Jan) from 
http://www.netbeans.org/builds_archive_release33.html or wait for RC2.
Comment 32 Jan Pokorsky 2002-01-21 15:14:34 UTC
*** Issue 17143 has been marked as a duplicate of this issue. ***
Comment 33 Quality Engineering 2003-07-01 16:22:14 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.