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 84211 - lots of InvalidObjectExceptions during normal code editing
Summary: lots of InvalidObjectExceptions during normal code editing
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-05 12:36 UTC by hupfdule
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log file created by netbeans (2.72 MB, text/plain)
2006-09-05 12:38 UTC, hupfdule
Details
another messages.log from netbeans (7.43 MB, text/plain)
2006-09-05 12:42 UTC, hupfdule
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hupfdule 2006-09-05 12:36:08 UTC
Since a few days Netbeans reports lots of InvalidObjectExceptions that occur 
for no real cause. Netbeans reports them with the litte red sign in the lower 
right corner. The logs are appended to this bug report.

I am not sure, wether this has something to do with it, but on class of my 
application (with lots of different classes) now has gets no further help from 
netbeans. Code completion doesn't work (it only shows the text "Please 
wait...") and no errors are marked in the code editor. However there is no 
problem in compiling and running the application. And, only one class has this 
problems.
Comment 1 hupfdule 2006-09-05 12:38:17 UTC
Created attachment 33598 [details]
messages.log file created by netbeans
Comment 2 hupfdule 2006-09-05 12:42:22 UTC
Created attachment 33599 [details]
another messages.log from netbeans
Comment 3 hupfdule 2006-09-05 12:44:04 UTC
There are also some IllegalStateExceptions.
Comment 4 ptressel 2006-10-05 06:41:40 UTC
I'm consistently getting InvalidObjectException under just about the same
circumstances as hupfdule.

It happened for the first time while I was editing a file, and NetBeans was
simultaneously trying to do its code-checking.  It flagged an incomplete section
of code as bad, and after I'd added enough to get rid of syntax errors, it
remained flagged as an error *much* longer than usual, i.e. the compile took
much longer than expected.  But it did eventually complete, and the error mark
was removed.

After I added a few more lines (completed statements with correct syntax), this
time, the code-check took even longer.  While the code-check was still not
completed, I got the InvalidObjectException.    I dismissed the error dialog. 
At this point, the "save file" option was grayed out in the right-mouse menu on
the file's editor tab, though the file had unsaved edits.  Eventually, the check
succeeded, and I was allowed to save the file.  I exited and restarted NetBeans.

After the restart, when I selected the file (via its editor tab) I had been
editing, its Navigator window now said "No view available".  Other files that I
had not edited were still ok -- when I selected them, their Navigator info was
as usual.  I commented out the code I'd added (all statements involved in both
events above).  That set off another code check.  This one never completed, but
I haven't gotten an InvalidObjectException (yet).

I was going to use cvs to revert the file, and see if that made the problem go
away, but...the cvs menu item in the right-mouse-on-file-tab menu was gone! 
It's still there for other, unedited, files.

I've been using this project successfully for months, and successfully edited
this same file last week.  One difference from other reports of
InvalidObjectException:  I have code completion turned off.

I'll attach my messages.log.  Then I'm going to go look for damage to project
files or cvs files in the project directory.
Comment 5 Jiri Prox 2006-10-05 10:09:34 UTC
Try deleting directory with mdr cache. It's located in
${your_userdir}/var/cache/mdrstorage
Comment 6 hupfdule 2006-10-05 13:11:18 UTC
> Try deleting directory with mdr cache

That actually solved the problem (at least for me). Well, I assume in some days/
weeks/month the problem will reoccur, but at least I know a workaround now. 

Was this already a known issue and is fixed in release 5.5?
Comment 7 Pavel Flaska 2006-10-05 13:25:06 UTC
Yes, it is known problem. IOE are thrown in different cases. Not sure if your
exact case is fixed, in 5.5 you should get it less often, but perhaps you will
met it again. That is the bad news. The better one is that in release 6.0 it
will be definitely fixed.
Comment 8 ptressel 2006-10-05 20:29:49 UTC
There were no apparent problems with project or cvs files.  The .java file that
was having problems, however, had some odd cvs-related damage:  It contained
what looked like two nested sets of merge conflict marks:

<<<<<<< RemoteGuidance.java
<<<<<<< RemoteGuidance.java
 * @version $Id: RemoteGuidance.java,v 1.78 2006/09/23 07:29:32 ptressel Exp $
=======
 * @version $Id: RemoteGuidance.java,v 1.78 2006/09/23 07:29:32 ptressel Exp $
>>>>>>> 1.73.2.11
=======
 * @version $Id: RemoteGuidance.java,v 1.78 2006/09/23 07:29:32 ptressel Exp $
>>>>>>> 1.75.2.14

However, I'd not done any merge recently.  Does NetBeans do an update as part of
its cvs "show changes" check?  I was assuming so, but also assuming NetBeans
would have the merge result go to some other file name, or else would clean up
any change to the real file resulting from the update.

This bit of damage happened to be inside a comment, so should not have affected
the compile...and the first few compiles after the problem started did complete
eventually.  In the past, I've run into compilers (for other languages) that
were not ignoring everything inside comments, e.g. they'd complain about
unmatched angle brackets or quotes...  Could the java compiler have acquired
such a problem with the introduction of <stuff> as a meaningful construct?

Anyhow, I edited out the junk above and restarted NetBeans, and the editor is
now behaving normally.
Comment 9 Jan Becicka 2006-10-26 16:27:32 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 10 Quality Engineering 2007-09-20 09:52:09 UTC
Reorganization of java component