Bug 5957 - Internal error in RecoveredMethod.add
Summary: Internal error in RecoveredMethod.add
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-15 10:58 EST by Jon Skeet CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Skeet CLA 2001-11-15 10:58:04 EST
No idea what caused this, but it happened twice in relatively quick succession:

Log: Thu Nov 15 16:07:31 GMT 2001
4 org.eclipse.ui 0 java.lang.NullPointerException
java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.parser.RecoveredMethod.add
(RecoveredMethod.java:72)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.add
(RecoveredBlock.java:262)
	at org.eclipse.jdt.internal.compiler.parser.RecoveredBlock.add
(RecoveredBlock.java:262)
	at 
org.eclipse.jdt.internal.codeassist.impl.AssistParser.buildInitialRecoveryState
(AssistParser.java:163)
	at org.eclipse.jdt.internal.compiler.parser.Parser.resumeOnSyntaxError
(Parser.java:7018)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse
(Parser.java:6416)
	at 
org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements
(AssistParser.java:712)
	at 
org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements
(AssistParser.java:688)
	at org.eclipse.jdt.internal.codeassist.impl.Engine.parseMethod
(Engine.java:105)
	at org.eclipse.jdt.internal.codeassist.impl.Engine.parseMethod
(Engine.java:74)
	at org.eclipse.jdt.internal.codeassist.SelectionEngine.select
(SelectionEngine.java:301)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:147)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:120)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect
(CompilationUnit.java:67)
	at 
org.eclipse.jdt.internal.ui.text.java.hover.JavaTypeHover.getHoverInfo
(JavaTypeHover.java:76)
	at 
org.eclipse.jdt.internal.ui.text.java.hover.JavaTextHover.getInformation
(JavaTextHover.java:176)
	at 
org.eclipse.jdt.internal.ui.text.java.hover.JavaTextHover.getHoverInfo
(JavaTextHover.java:153)
	at org.eclipse.jface.text.TextViewerHoverManager.computeInformation
(TextViewerHoverManager.java:56)
	at 
org.eclipse.jface.text.AbstractInformationControlManager.showInformation
(AbstractInformationControlManager.java:523)
	at 
org.eclipse.jface.text.AbstractHoverInformationControlManager$MouseTracker.mouse
Hover(AbstractHoverInformationControlManager.java:201)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:207)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:635)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1365)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1167)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:727)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:710)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:820)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
	at org.eclipse.core.launcher.Main.run(Main.java:502)
	at org.eclipse.core.launcher.Main.main(Main.java:362)
Comment 1 Philipe Mulet CLA 2001-11-15 17:06:04 EST
It is a parser crash. The stack trace indicates you were performing a codeassist 
action. Could you please try to isolate the code fragment which you were 
codeassisting inside ? The compilation unit would be enough (no need for other 
ones around).

Furthermore, could you please indicate which build number you were using when 
this happened ?
Comment 2 Jon Skeet CLA 2001-11-15 17:54:44 EST
I'll see if I can find the compilation unit, although if I'm right it's 
probably changed rather a lot in the mean time... note that I certainly wasn't 
*deliberately* using code-assist at the time. I suspect it was automatic code-
assist making my life hard again :(   (I'm looking forward to the next stable 
build :)

Build 20011107
Comment 3 Philipe Mulet CLA 2001-11-15 18:25:21 EST
I think I found the bug. There was one missing null check (when RecoveredMethod 
has no parent, precisely on line 72 - see stack trace above).

No more need for a source sample.

Thanks for the feedback.