Skip to content

NPE on loading corrupt proofs #2

@jwiesler

Description

@jwiesler

I think some rules leave corrupted RuleApps when they fail and it is therefore not safe to call getStatistics on a proof that failed to load.
The tool should either distinguish the two cases load failed and proof is not closed or at least catch the NPE and not crash the whole tool.

[INFO] Contract: `de.wiesler.BucketPointers[de.wiesler.BucketPointers::bucketStart(int)].JML model_behavior operation contract.0`
    [INFO] Proof found: proofs\BucketPointers\de.wiesler.BucketPointers(de.wiesler.BucketPointers__bucketStart(int)).JML model_behavior operation contract.0.proof. Try loading.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "de.uka.ilkd.key.rule.RuleApp.rule()" because the return value of "de.uka.ilkd.key.proof.Node.getAppliedRuleApp()" is null
        at de.uka.ilkd.key.proof.Statistics$TemporaryStatistics.interactiveRuleApps(Statistics.java:313)
        at de.uka.ilkd.key.proof.Statistics$TemporaryStatistics.changeOnNode(Statistics.java:260)
        at de.uka.ilkd.key.proof.Statistics.<init>(Statistics.java:93)
        at de.uka.ilkd.key.proof.Statistics.<init>(Statistics.java:117)
        at de.uka.ilkd.key.proof.Proof.getStatistics(Proof.java:1216)
        at de.uka.ilkd.key.CheckerKt.generateSummary(Checker.kt:422)
        at de.uka.ilkd.key.CheckerKt.access$generateSummary(Checker.kt:1)
        at de.uka.ilkd.key.Checker.printStatistics(Checker.kt:352)
        at de.uka.ilkd.key.Checker.loadProof(Checker.kt:339)
        at de.uka.ilkd.key.Checker.runContract(Checker.kt:268)
        at de.uka.ilkd.key.Checker.access$runContract(Checker.kt:53)
        at de.uka.ilkd.key.Checker$run$4$2.invoke(Checker.kt:229)
        at de.uka.ilkd.key.Checker$run$4$2.invoke(Checker.kt:214)
        at de.uka.ilkd.key.Checker.printBlock(Checker.kt:179)
        at de.uka.ilkd.key.Checker$run$4.invoke(Checker.kt:214)
        at de.uka.ilkd.key.Checker$run$4.invoke(Checker.kt:193)
        at de.uka.ilkd.key.Checker.printBlock(Checker.kt:179)
        at de.uka.ilkd.key.Checker.run(Checker.kt:193)
        at de.uka.ilkd.key.Checker.run(Checker.kt:162)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:170)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:16)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:258)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:255)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:273)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:298)
        at de.uka.ilkd.key.CheckerKt.main(Checker.kt:393)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions