Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366050 - NPE when editing .mtl
Summary: NPE when editing .mtl
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 10:27 EST by William Piers CLA
Modified: 2015-05-27 08:56 EDT (History)
1 user (show)

See Also:


Attachments
Example reproducing the bug (127.62 KB, application/x-gzip)
2012-05-31 10:35 EDT, Michaël Melchiore CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Piers CLA 2011-12-08 10:27:47 EST
I got the following NPE when editing .mtl files (using Acceleo 3.3M3):

java.lang.NullPointerException
	at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreEList.java:212)
	at org.eclipse.emf.ecore.util.EcoreEList.indexOf(EcoreEList.java:411)
	at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:463)
	at org.eclipse.emf.ecore.util.EcoreUtil.remove(EcoreUtil.java:3096)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.transformStepCopy(CST2ASTConverter.java:400)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.transformStepCopyBody(CST2ASTConverter.java:1502)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.transformStepCopy(CST2ASTConverter.java:301)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.transformStepCopyOwnedModuleElement(CST2ASTConverter.java:1314)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.transformStepCopy(CST2ASTConverter.java:193)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter.createAST(CST2ASTConverter.java:169)
	at org.eclipse.acceleo.parser.AcceleoSourceBuffer.createAST(AcceleoSourceBuffer.java:310)
	at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent.createAST(AcceleoSourceContent.java:1295)
	at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob.runCreateAST(AcceleoSourceContent.java:286)
	at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob$1.run(AcceleoSourceContent.java:250)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Michaël Melchiore CLA 2012-05-31 10:35:47 EDT
Created attachment 216576 [details]
Example reproducing the bug

I get the same behaviour on Acceleo 3.2.1.v20120511-0335.

I have attached a little workspace where the NPE shows frequently.

Step to repoduce:
1. Open the T2.mtl file in acceleo.testcase.addon/src/acceleo.testcase.addon.mm2.m2t.
2. Edit the type of the aC3 argument at l. 26 from "C3" to "C"
3. Ctrl + Space to active auto-completion
4. A popup displays a NPE exception

I am using Eclipse 3.6.2.M20110210-1200
Comment 2 Cedric Brun CLA 2013-08-06 07:33:19 EDT
Thanks for the detailled procedure, I could reproduce the issue.
Comment 3 Cedric Brun CLA 2013-08-06 08:00:55 EDT
Fixed with commit 957bc2488b68c8092ef4d0e96e4cfc52b54d86f6 ( http://git.eclipse.org/c/m2t/org.eclipse.acceleo.git/commit/?id=957bc2488b68c8092ef4d0e96e4cfc52b54d86f6
)

Thanks for your feedback.
Comment 5 Laurent Goubet CLA 2015-05-27 08:56:39 EDT
Closing resolved bugs