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 81120 - InvalidObjectException after invoking code completion; code completion broken for inner classes most of the time
Summary: InvalidObjectException after invoking code completion; code completion broke...
Status: RESOLVED DUPLICATE of bug 80609
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-25 23:54 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2006-07-25 23:54:49 UTC
I've been noticing some weirdness in code completion with trunk build 060717. 
What happens:
 - I am editing a class;  frequently all inner/nested classes will disappear
from Navigator while I am editing - this happens if I leave some of the file
with syntax errors.
 - Once I am in this state, code completion no longer works for any inner classes
 - Once in a while, if you invoke code completion exactly when the reparse is
happening, you get the exception below.

In the case where I got the stack trace below, I had a source file called
PopupComponentManager.  There is a static nested class,
PopupComponentManager.PopupInfo, and an instance field on the outer field.  I
was editing an inner listener implementation, and typed
popupInfo.
Code completion came up.
I pressed backspace
I pressed . again (I might have pressed Ctrl-Enter)
and the exception was thrown.

I'd expect the last known good data from the source file would be used for code
completion, possibly omitting data from lines known to have been modified since
that data was received.  It's very annoying that about 75% of the time, code
completion is broken for inner classes because the source file is being edited.

javax.jmi.reflect.InvalidObjectException: Object with MOFID
BE644DB9-1C08-11DB-918A-749DBC90AA77:000000000000130C no longer exists, class:
org.netbeans.jmi.javamodel.JavaClass$Impl
	at
org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:365)
	at
org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:54)
	at org.netbeans.mdr.handlers.InstanceHandler._handleGet(InstanceHandler.java:199)
	at org.netbeans.jmi.javamodel.JavaClass$Impl.super_getModifiers(Unknown Source)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getModifiers(JavaClassImpl.java:84)
	at org.netbeans.jmi.javamodel.JavaClass$Impl.getModifiers(Unknown Source)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ParameterizedTypeImpl.getModifiers(ParameterizedTypeImpl.java:140)
	at org.netbeans.jmi.javamodel.ParameterizedType$Impl.getModifiers(Unknown Source)
	at org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:848)
	at org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:405)
	at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.findFieldsMethodsAndInnerClasses(NbJavaJMICompletionQuery.java:1106)
	at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.resolveExp(NbJavaJMICompletionQuery.java:293)
	at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery.getResult(NbJavaJMICompletionQuery.java:65)
	at
org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:146)
	at
org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:81)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$Query.query(JavaCompletionProvider.java:113)
	at
org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:525)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:957)
Comment 1 Jiri Prox 2006-07-26 10:08:20 UTC
Looks like duplicate of issue 80609
Comment 2 Jan Becicka 2006-08-04 17:11:23 UTC
Please attach complete messages.log. Thanks
Comment 3 Jan Becicka 2006-08-08 15:27:00 UTC

*** This issue has been marked as a duplicate of 80609 ***