Bug 12208 - NPE in AST eval
Summary: NPE in AST eval
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 12632 (view as bug list)
Depends on: 12326
Blocks:
  Show dependency tree
 
Reported: 2002-03-25 09:35 EST by Darin Wright CLA
Modified: 2002-04-08 17:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2002-03-25 09:35:10 EST
Test:

* VectorTest
Comment 1 Darin Wright CLA 2002-03-25 09:36:27 EST
Test case:
* VectorTest
* breakpoint in first line of #testCapacity
* when breakpoint is hit, evaluate "this.fFull.size()"

java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTCuToEvalSourceMapper.buildCompilation
Unit(ASTCuToEvalSourceMapper.java:391)
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTCuToEvalSourceMapper.endVisit
(ASTCuToEvalSourceMapper.java:501)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0
(CompilationUnit.java:140)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:906)
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTCodeSnippetToCuMapper.createMagicCode
FromSource(ASTCodeSnippetToCuMapper.java:87)
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTCodeSnippetToCuMapper.getSource
(ASTCodeSnippetToCuMapper.java:115)
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTAPIEvaluationEngine.getCompiledExpres
sion(ASTAPIEvaluationEngine.java:125)
	at 
org.eclipse.jdt.internal.debug.eval.ast.ASTAPIEvaluationEngine.evaluate
(ASTAPIEvaluationEngine.java:62)
	at org.eclipse.jdt.internal.debug.ui.actions.EvaluateAction.run
(EvaluateAction.java:192)
	at org.eclipse.jdt.internal.debug.ui.actions.DisplayAction.run
(DisplayAction.java:137)
	at org.eclipse.jdt.internal.debug.ui.actions.EvaluateAction.run
(EvaluateAction.java:497)
	at org.eclipse.ui.internal.PluginAction.runWithEvent
(PluginAction.java:204)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1420)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:715)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:698)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:777)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:14)
Comment 2 Jared Burns CLA 2002-03-26 18:02:29 EST
We tracked this problem down to a bug in the JDT core. VectorTest still doesn't
work because of the * import.
Comment 3 Jared Burns CLA 2002-04-01 11:19:21 EST
The fix to bug 12326 eliminates this problem.
Comment 4 Jared Burns CLA 2002-04-01 11:19:32 EST
Please verify.
Comment 5 Darin Wright CLA 2002-04-02 09:19:40 EST
Now I get the following NPE:

java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.buildC
ompilationUnit(SourceBasedSourceGenerator.java:402)
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.endVis
it(SourceBasedSourceGenerator.java:539)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0
(CompilationUnit.java:140)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:906)
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.EvaluationSourceGenerator.createE
valuationSourceFromSource(EvaluationSourceGenerator.java:75)
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.EvaluationSourceGenerator.getSour
ce(EvaluationSourceGenerator.java:112)
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledEx
pression(ASTEvaluationEngine.java:164)
	at 
org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate
(ASTEvaluationEngine.java:62)
	at org.eclipse.jdt.internal.debug.ui.actions.EvaluateAction.run
(EvaluateAction.java:246)
	at org.eclipse.jdt.internal.debug.ui.actions.DisplayAction.run
(DisplayAction.java:121)
	at org.eclipse.jdt.internal.debug.ui.actions.EvaluateAction.run
(EvaluateAction.java:550)
	at org.eclipse.ui.internal.PluginAction.runWithEvent
(PluginAction.java:204)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1420)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:755)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:738)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:777)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:14)
Comment 6 Darin Wright CLA 2002-04-02 09:20:07 EST
see New NPE (above)
Comment 7 Jared Burns CLA 2002-04-02 10:00:30 EST
The fix in jdt core is in the latest CVS in the dev.eclipse.org repository.
Please be sure to use the latest org.eclipse.jdt.core to verify.
Comment 8 Jared Burns CLA 2002-04-02 10:00:44 EST
One more time. :)
Comment 9 Darin Wright CLA 2002-04-02 11:45:22 EST
*** Bug 12632 has been marked as a duplicate of this bug. ***
Comment 10 Darin Wright CLA 2002-04-08 17:46:30 EDT
Verified