Skip to content

CIF to BDD conversion crashes if termination is requested while converting an update

If convertUpdates stops prematurely due to a termination request, we should check for termination upon its return in convertPlantReqAuts. Now, cifBddEdge.error.not() is computed, and since error may then be null, this crashes:

            java.lang.NullPointerException: Cannot invoke "com.github.javabdd.BDD.not()" because "cifBddEdge.error" is null
                at org.eclipse.escet.cif.bdd.conversion.CifToBddConverter.convertPlantReqAuts(CifToBddConverter.java:1922)
                at org.eclipse.escet.cif.bdd.conversion.CifToBddConverter.convertSpec(CifToBddConverter.java:636)
                at org.eclipse.escet.cif.bdd.conversion.CifToBddConverter.convert(CifToBddConverter.java:312)
                at org.eclipse.escet.cif.datasynth.CifDataSynthesisApp.doSynthesis(CifDataSynthesisApp.java:261)
                at org.eclipse.escet.cif.datasynth.CifDataSynthesisApp.runInternal(CifDataSynthesisApp.java:174)
                at org.eclipse.escet.common.app.framework.Application.runApplication(Application.java:315)
                at org.eclipse.escet.common.app.framework.ChildAppStarter$1.run(ChildAppStarter.java:285)
                at java.base/java.lang.Thread.run(Thread.java:833)

This bug was introduced in !941 (merged).