Community
Participate
Working Groups
Using I20070321-1800, executing: run() in a scrapbook page leads to a NPE and the scrapbook page is unresponsive. See bug 178860 for the jdt.debug issue. With the patch for bug 178860 released, you get: Internal compiler error java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.codegen.CodeStream.getfield(CodeStream.java:2842) at org.eclipse.jdt.internal.eval.CodeSnippetThisReference.generateCode(CodeSnippetThisReference.java:61) at org.eclipse.jdt.internal.eval.CodeSnippetMessageSend.generateCode(CodeSnippetMessageSend.java:73) at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.generateCode(ReturnStatement.java:126) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:229) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:176) at org.eclipse.jdt.internal.eval.CodeSnippetTypeDeclaration.generateCode(CodeSnippetTypeDeclaration.java:60) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:581) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:215) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:624) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:391) at org.eclipse.jdt.internal.eval.Evaluator.getClasses(Evaluator.java:130) at org.eclipse.jdt.internal.eval.EvaluationContext.evaluate(EvaluationContext.java:273) at org.eclipse.jdt.internal.eval.EvaluationContext.evaluate(EvaluationContext.java:302) at org.eclipse.jdt.internal.core.eval.EvaluationContextWrapper.evaluateCodeSnippet(EvaluationContextWrapper.java:237) at org.eclipse.jdt.internal.debug.eval.LocalEvaluationEngine$1.run(LocalEvaluationEngine.java:428) at java.lang.Thread.run(Thread.java:595) inside the scrapbook page.
The type of the delegateThis field binding is null.
If I explicitely use "this", I get: Cannot use this in a static context so this.run() works fine, but we don't report the error properly in case the implicit 'this' is used.
Created attachment 61817 [details] Proposed fix This patch will report an error for accessing this in a static context if the delegateThis field cannot be resolved.
Released for 3.3M7
Verified for 3.3 M7 using build I20070427-0010.