| Summary: | NPE computing text hover | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | laurent.goubet, marc.poulhies, stephane.begaudeau |
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Ed Willink
Nothing to do with hovers, I'm getting a variety of prefix exaplanations for the same stack trace java.lang.NullPointerException (ultimately from Content Assist) Unexpected runtime error while computing a text hover This is an overlooked potential NPE that, indeed, can be triggered from various locations. It has now been fixed on HEAD. Once again: Please provide some opportunity for the 'fix' to be assessed. In RC2. The stack trace is now: ava.lang.NullPointerException at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.classifierEqual(AcceleoTypeResolver.java:226) at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:205) at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:1) at org.eclipse.ocl.AbstractTypeResolver.getShadowClass(AbstractTypeResolver.java:950) at org.eclipse.ocl.AbstractTypeResolver.resolveAdditionalOperation(AbstractTypeResolver.java:737) at org.eclipse.ocl.AbstractEnvironment.addOperation(AbstractEnvironment.java:478) at org.eclipse.ocl.AbstractEnvironment.addHelperOperation(AbstractEnvironment.java:456) at org.eclipse.ocl.ecore.EcoreEnvironment.defineOperation(EcoreEnvironment.java:582) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addQueryToScope(OCLParser.java:553) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addBehavioralFeaturesToScope(OCLParser.java:446) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:347) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:323) at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.transformStepResolve(CST2ASTConverterWithResolver.java:185) at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.resolveAST(CST2ASTConverterWithResolver.java:125) at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.resolveAST(CST2ASTConverterWithResolver.java:104) at org.eclipse.acceleo.parser.AcceleoSourceBuffer.resolveAST(AcceleoSourceBuffer.java:336) at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob.runCreateAST(AcceleoSourceContent.java:291) at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob$1.run(AcceleoSourceContent.java:249) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) A new fix has been contributed on HEAD. It will be available in 3.1 RC3 tomorrow. Still have the error with 3.1v20110607-602. Maybe the fix has not been merged in the version shipped with eclipse indigo ? "Unexpected runtime error while computing a text hover" java.lang.NullPointerException at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.classifierEqual(AcceleoTypeResolver.java:228) at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:205) at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:1) at org.eclipse.ocl.AbstractTypeResolver.getShadowClass(AbstractTypeResolver.java:950) at org.eclipse.ocl.AbstractTypeResolver.resolveAdditionalOperation(AbstractTypeResolver.java:737) at org.eclipse.ocl.AbstractEnvironment.addOperation(AbstractEnvironment.java:478) at org.eclipse.ocl.AbstractEnvironment.addHelperOperation(AbstractEnvironment.java:456) at org.eclipse.ocl.ecore.EcoreEnvironment.defineOperation(EcoreEnvironment.java:582) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addTemplateToScope(OCLParser.java:497) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addBehavioralFeaturesToScope(OCLParser.java:443) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:347) at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:323) at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.transformStepResolve(CST2ASTConverterWithResolver.java:185) at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.resolveAST(CST2ASTConverterWithResolver.java:125) at org.eclipse.acceleo.parser.AcceleoSourceBuffer.resolveAST(AcceleoSourceBuffer.java:352) at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent.getResolvedASTNode(AcceleoSourceContent.java:1313) at org.eclipse.acceleo.internal.ide.ui.editors.template.hover.AcceleoTextHover.getHoverInfo2(AcceleoTextHover.java:109) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166) *** Bug 352452 has been marked as a duplicate of this bug. *** any possibility to test this before the next release ? It's really hard to work with this many errors poping-up "randomly"... (In reply to comment #7) > any possibility to test this before the next release ? It's really hard to work > with this many errors poping-up "randomly"... You can always grab the latest nightly build in the Eclipse Hudson: https://hudson.eclipse.org/hudson/job/m2t-acceleo-3.1/ You can find the update site (p2 repository) in the latest artifacts. You can use this as an update site: https://hudson.eclipse.org/hudson/job/m2t-acceleo-3.1/lastSuccessfulBuild/artifact/Acceleo.p2.repository/ Of course, this is the nightly build of Acceleo 3.1.1 so use it with caution. (In reply to comment #4) > A new fix has been contributed on HEAD. It will be available in 3.1 RC3 > tomorrow. I've not seen this in the Indigo release, which I have been using quite extensively in similar ways to those that originally identified the problems. The algorithm has been improved and new unit tests have been contributed for this method and in general for the Acceleo parser. Now that the switch to git is completed, unit tests have been re-activated during the build on hudson. I've just installed the latest nightly, and I can confirm that I don't have the problem anymore. Thanks for the quick answer + fix ! Closing our "resolved" and "verified" bugs. |