M2doc 3.1.0: NPE in a template

Hi, this issue is blocking right now further development of our template - this template, if called, generates an NPE (“technical error during generation”) or stalls teh generation process. The error ocurs only if {m:else} or {m:elseif} is present - if it is removed, it works fine.

({} intentionally left out)

m:template createPropertyRow(level:Integer, property: information::Property)
m:if level = 1
—TABLE ROW—
m:else
TEST
m:endif
m:endtemplate

Hi,
I guess it would be useful if you were able to copy the stack trace of the NPE here.
Stephane

Hi Stephane, needless to mention I would like to :wink: Except I do not know where to find it, because for some reason it is just sometimes, but not always written into the generated file, nor any error file in the Capella project for that matter. Marek

Now, after some changes in the template I´ve got the stack trace:
createClassRows(java.lang.Integer,EClass=Classifier) with arguments [1, org.polarsys.capella.core.data.information.impl.ClassImpl@79860876 (id: 04dfc185-15c7-4395-bf52-0fcbb1182ebc, sid: null) (name: Class 1) (visibleInDoc: true, visibleInLM: true, summary: null, review: null) (abstract: false) (final: false, visibility: UNSET) (isPrimitive: false)] failed: null java.lang.NullPointerException at org.obeonetwork.m2doc.generator.M2DocEvaluator.insertRun(M2DocEvaluator.java:411) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseStaticFragment(M2DocEvaluator.java:376) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseStaticFragment(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:239) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1491) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1489) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1489) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.applyCallOnSequence(EvaluationServices.java:275) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:203) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1262) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:314) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1262) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:314) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseDocumentTemplate(M2DocEvaluator.java:297) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseDocumentTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:279) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.util.M2DocUtils.generate(M2DocUtils.java:845) at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:507) at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:432) at org.obeonetwork.m2doc.genconf.editor.command.GenerateHandler$GenerateJob.runInWorkspace(GenerateHandler.java:87) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

This is clearly a bug. My guess it is related to the table row before the else block.
M2Doc seems to loose track of the generated paragraph.

I opened the following bug. If you can provide a minimal reproduction case it would be great:

After time-consuming experimening i seems that the NPE occurs because m2doc is not able to connect rows to a table. A hierarchy of templates is used to build a table,each template contributing one or more rows (wchich, naturally are standalone tables of their own in the Word template). Now, some rows are connected seamlessly to a table, but at one particular place a NPE is thrown. The NPE is not thrown however as soon as an empty text line (new line) is added following the table row in the template to disrupt the table at that point. May it be, that the rows have different widths which causes this trouble? Anyway, imho by no means this justifies an NPE…

This NPE is thrown even if the last called template (“leaf” template in the hierarchy of templates) contains just a table row without a new line:following it

createClassRows(java.lang.Integer,EClass=Classifier) with arguments [1, org.polarsys.capella.core.data.information.impl.ClassImpl@843ea3a (id: 04dfc185-15c7-4395-bf52-0fcbb1182ebc, sid: null) (name: Class 1) (visibleInDoc: true, visibleInLM: true, summary: null, review: null) (abstract: false) (final: false, visibility: UNSET) (isPrimitive: false)] failed: null java.lang.NullPointerException at org.obeonetwork.m2doc.generator.M2DocEvaluator.insertRun(M2DocEvaluator.java:411) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseStaticFragment(M2DocEvaluator.java:376) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseStaticFragment(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:239) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1491) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1489) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1489) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseConditional(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:134) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1226) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseRepetition(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:147) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:340) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:221) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:242) at org.obeonetwork.m2doc.services.M2DocTemplateService.internalInvoke(M2DocTemplateService.java:1) at org.eclipse.acceleo.query.runtime.impl.AbstractService.invoke(AbstractService.java:135) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callService(EvaluationServices.java:129) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.call(EvaluationServices.java:172) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:208) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.applyCallOnSequence(EvaluationServices.java:275) at org.eclipse.acceleo.query.runtime.impl.EvaluationServices.callOrApply(EvaluationServices.java:203) at org.eclipse.acceleo.query.parser.AstEvaluator.caseCall(AstEvaluator.java:189) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:119) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstEvaluator.eval(AstEvaluator.java:109) at org.eclipse.acceleo.query.runtime.impl.QueryEvaluationEngine.eval(QueryEvaluationEngine.java:52) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:587) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseQuery(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:186) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1262) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:314) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1262) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseLet(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:314) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1467) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseBlock(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:199) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseDocumentTemplate(M2DocEvaluator.java:297) at org.obeonetwork.m2doc.generator.M2DocEvaluator.caseDocumentTemplate(M2DocEvaluator.java:1) at org.obeonetwork.m2doc.template.util.TemplateSwitch.doSwitch(TemplateSwitch.java:279) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.obeonetwork.m2doc.generator.M2DocEvaluator.doSwitch(M2DocEvaluator.java:1242) at org.obeonetwork.m2doc.generator.M2DocEvaluator.generate(M2DocEvaluator.java:282) at org.obeonetwork.m2doc.util.M2DocUtils.generate(M2DocUtils.java:845) at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:507) at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:432) at org.obeonetwork.m2doc.genconf.editor.command.GenerateHandler$GenerateJob.runInWorkspace(GenerateHandler.java:87) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hi, here is a commented code sample to generate an NPE: m2doc_issue399_CodeLeadingToNPE.docx (14.6 KB)

Thank you, I’ll add it to the bug report.

Hi Yvan, this NPE issue is the most crucial one for us, because as of now there is no feasible workaround except inserting empty textlines in the template. This makes the generated table to look very awkward indeed. And it prohobit us to make further progress with the template (we need to generate many such nested i.e. recusrsive tables). So, ist it possible for you to get the highest priority and assign and corret the issue? Assuming that there would be bug fix available soon, when and how can we actually get it? br, M.

Hi,
I am sure Yvan will do its best on this, but please be aware that we are also providing services around m2doc in case you require professional support on this.
All the best,
Stephane LACRAMPE
Obeo Canada

I reproduce the bug on the master branch. I’ll try to fix that before the next release.

The NPE is raised when M2Doc tries to insert the space character after:
{ m: level.createPropertyRow(prop)}
You might be able to solve your problem by removing it.

Indeed, no NPE is thrown after removing the space (which itself was of course a bug, although very hard to spot). Thanks!

The generated table is almost in one piece now, except at some places the column widths do not seem to match between the rows and the table is split. This may be an implicit Word table formatting logic. I will investigate that and experiment a little bit more and may be get back to you on that should it seem like there may be an m2doc issue involved.

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.