Description
Commenting out some includes in an included file and choice branches in a choice Dispatch causes this stacktrace. The repo that can reproduce this error is private and will follow in the comments. This error occurs during parse/unparse
Specifically vmf.main.dfdl.xsd and
java.util.NoSuchElementException: head of empty list at scala.collection.immutable.Nil$.head(List.scala:428) at scala.collection.immutable.Nil$.head(List.scala:425) at org.apache.daffodil.dpath.NamedStep.downwardStep$lzycompute(Expression.scala:1157) at org.apache.daffodil.dpath.NamedStep.downwardStep(Expression.scala:1156) at org.apache.daffodil.dpath.NamedStep.compiledDPath$lzycompute(Expression.scala:1149) at org.apache.daffodil.dpath.NamedStep.compiledDPath(Expression.scala:1148) at org.apache.daffodil.dpath.RelativePathExpression.$anonfun$compiledDPath$3(Expression.scala:818) at scala.collection.immutable.List.flatMap(List.scala:335) at org.apache.daffodil.dpath.RelativePathExpression.compiledDPath$lzycompute(Expression.scala:818) at org.apache.daffodil.dpath.RelativePathExpression.compiledDPath(Expression.scala:794) at org.apache.daffodil.dpath.FNOneArgExpr.compiledDPath$lzycompute(Expression.scala:2172) at org.apache.daffodil.dpath.FNOneArgExpr.compiledDPath(Expression.scala:2170) at org.apache.daffodil.dpath.FunctionCallExpression.compiledDPath$lzycompute(Expression.scala:1410) at org.apache.daffodil.dpath.FunctionCallExpression.compiledDPath(Expression.scala:1410) at org.apache.daffodil.dpath.ComparisonExpression.compiledDPath$lzycompute(Expression.scala:385) at org.apache.daffodil.dpath.ComparisonExpression.compiledDPath(Expression.scala:384) at org.apache.daffodil.dpath.IfExpression.compiledDPath$lzycompute(Expression.scala:648) at org.apache.daffodil.dpath.IfExpression.compiledDPath(Expression.scala:647) at org.apache.daffodil.dpath.WholeExpression.compiledDPath$lzycompute(Expression.scala:638) at org.apache.daffodil.dpath.WholeExpression.compiledDPath(Expression.scala:638) at org.apache.daffodil.dpath.DFDLPathExpressionParser.compile(DFDLExpressionParser.scala:60) at org.apache.daffodil.dsom.ExpressionCompiler.compileRealExpression(CompiledExpression.scala:222) at org.apache.daffodil.dsom.ExpressionCompiler.compileExpression(CompiledExpression.scala:76) at org.apache.daffodil.dsom.ExpressionCompiler.compileDelimiter(CompiledExpression.scala:161) at org.apache.daffodil.dsom.DelimitedRuntimeValuedPropertiesMixin.$anonfun$terminatorExpr$1(RuntimePropertyMixins.scala:210) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.liftedTree1$1(OOLAG.scala:679) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.valueAsAny$lzycompute(OOLAG.scala:677) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.valueAsAny(OOLAG.scala:674) at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:724) at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:724) at org.apache.daffodil.dsom.DelimitedRuntimeValuedPropertiesMixin.terminatorExpr(RuntimePropertyMixins.scala:205) at org.apache.daffodil.dsom.DelimitedRuntimeValuedPropertiesMixin.terminatorExpr$(RuntimePropertyMixins.scala:205) at org.apache.daffodil.dsom.ModelGroup.terminatorExpr$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.terminatorExpr(ModelGroup.scala:137) at org.apache.daffodil.dsom.InitiatedTerminatedMixin.hasTerminator(InitiatedTerminatedMixin.scala:76) at org.apache.daffodil.dsom.InitiatedTerminatedMixin.hasTerminator$(InitiatedTerminatedMixin.scala:75) at org.apache.daffodil.dsom.ModelGroup.hasTerminator$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.hasTerminator(ModelGroup.scala:137) at org.apache.daffodil.dsom.SequenceGroupTermBase.hasDelimiters$lzycompute(SequenceGroup.scala:95) at org.apache.daffodil.dsom.SequenceGroupTermBase.hasDelimiters(SequenceGroup.scala:95) at org.apache.daffodil.dsom.Term.couldHaveText(Term.scala:216) at org.apache.daffodil.dsom.Term.couldHaveText$(Term.scala:216) at org.apache.daffodil.dsom.ModelGroup.couldHaveText$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.couldHaveText(ModelGroup.scala:137) at org.apache.daffodil.dsom.TermEncodingMixin.summaryEncoding(TermEncodingMixin.scala:205) at org.apache.daffodil.dsom.TermEncodingMixin.summaryEncoding$(TermEncodingMixin.scala:202) at org.apache.daffodil.dsom.ModelGroup.summaryEncoding$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.summaryEncoding(ModelGroup.scala:137) at org.apache.daffodil.dsom.TermEncodingMixin.isScannable(TermEncodingMixin.scala:163) at org.apache.daffodil.dsom.TermEncodingMixin.isScannable$(TermEncodingMixin.scala:160) at org.apache.daffodil.dsom.ModelGroup.isScannable$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.isScannable(ModelGroup.scala:137) at org.apache.daffodil.dsom.TermEncodingMixin.encodingInfo(TermEncodingMixin.scala:107) at org.apache.daffodil.dsom.TermEncodingMixin.encodingInfo$(TermEncodingMixin.scala:100) at org.apache.daffodil.dsom.ModelGroup.encodingInfo$lzycompute(ModelGroup.scala:137) at org.apache.daffodil.dsom.ModelGroup.encodingInfo(ModelGroup.scala:137) at org.apache.daffodil.runtime1.SequenceTermRuntime1Mixin.sequenceRuntimeData(SequenceTermRuntime1Mixin.scala:36) at org.apache.daffodil.runtime1.SequenceTermRuntime1Mixin.sequenceRuntimeData$(SequenceTermRuntime1Mixin.scala:31) at org.apache.daffodil.dsom.SequenceTermBase.sequenceRuntimeData$lzycompute(SequenceGroup.scala:50) at org.apache.daffodil.dsom.SequenceTermBase.sequenceRuntimeData(SequenceGroup.scala:50) at org.apache.daffodil.runtime1.SequenceTermRuntime1Mixin.modelGroupRuntimeData(SequenceTermRuntime1Mixin.scala:29) at org.apache.daffodil.runtime1.SequenceTermRuntime1Mixin.modelGroupRuntimeData$(SequenceTermRuntime1Mixin.scala:29) at org.apache.daffodil.dsom.SequenceTermBase.modelGroupRuntimeData(SequenceGroup.scala:50) at org.apache.daffodil.dsom.SequenceTermBase.modelGroupRuntimeData(SequenceGroup.scala:50) at org.apache.daffodil.runtime1.ModelGroupRuntime1Mixin.$anonfun$$init$$1(ModelGroupRuntime1Mixin.scala:29) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.liftedTree1$1(OOLAG.scala:679) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.valueAsAny$lzycompute(OOLAG.scala:677) at org.apache.daffodil.oolag.OOLAG$OOLAGValueBase.valueAsAny(OOLAG.scala:674) at org.apache.daffodil.oolag.OOLAG$OOLAGHost.$anonfun$checkErrors$2(OOLAG.scala:427) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at org.apache.daffodil.oolag.OOLAG$.keepGoing(OOLAG.scala:65) at org.apache.daffodil.oolag.OOLAG$OOLAGHost.checkErrors(OOLAG.scala:427) at org.apache.daffodil.oolag.OOLAG$OOLAGHost.checkErrors$(OOLAG.scala:413) at org.apache.daffodil.dsom.SchemaComponentImpl.checkErrors(SchemaComponent.scala:34) at org.apache.daffodil.oolag.OOLAG$OOLAGHost.isError(OOLAG.scala:484) at org.apache.daffodil.oolag.OOLAG$OOLAGHost.isError$(OOLAG.scala:483) at org.apache.daffodil.dsom.SchemaSet.isError(SchemaSet.scala:543) at org.apache.daffodil.compiler.ProcessorFactory.isError(Compiler.scala:135) at org.apache.daffodil.compiler.Compiler.org$apache$daffodil$compiler$Compiler$$compileSourceInternal(Compiler.scala:412) at org.apache.daffodil.compiler.Compiler$.org$apache$daffodil$compiler$Compiler$$compileSourceSynchronizer(Compiler.scala:454) at org.apache.daffodil.compiler.Compiler.compileSource(Compiler.scala:397) at org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.compileProcessor(DaffodilTDMLDFDLProcessor.scala:147) at org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.getProcessor(DaffodilTDMLDFDLProcessor.scala:164) at org.apache.daffodil.tdml.TDMLCompileResultCache.getCompileResult(TDMLRunner.scala:2708) at org.apache.daffodil.tdml.DFDLTestSuite.getCompileResult(TDMLRunner.scala:508) at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:889) at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:418) at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:191) at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:197) at com.tresys.vmf.noc_header.Test6017_au.test_CA0101000_K01_01_GoodMessage_u(TestVMFFullMessages6017_au.scala:24) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)