This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 680

Summary: Assert in function gives exception in JSON parsing.
Product: UPPAAL Stratego Reporter: Martin Kristjansen <mk>
Component: GUIAssignee: Marius Mikučionis <marius>
Status: ASSIGNED ---    
Severity: normal    
Priority: P5    
Version: 4.1.20-7   
Hardware: PC   
OS: All   
Architecture:
Attachments: Minimal model, that reproduces the exception

Description Martin Kristjansen 2020-06-08 08:58:00 CEST
Created attachment 345 [details]
Minimal model, that reproduces the exception

I am running the uppaal64-4.1.20-stratego-8-beta3.

I am using asserts in my functions as there are branches in the functions that such never be taken. When I am using the simulator and whenever a branch with an assert is possible, a JSON exception is called. It took me a while to figure out that it happened when an assert was hit.

I have attached a minimal example that reproduced the error as soon as one starts the simulator.

The exception text is `Expected field name "src", got "path"`.

The stack trace from the command line:
Expected field name "src", got "path"
        at com.uppaal.engine.protocol.JsonMessageParser.expectFieldName(JsonMessageParser.java:331)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObjectField(JsonMessageParser.java:122)
        at com.uppaal.engine.protocol.viewmodel.SuccessorViewModel.accept(SuccessorViewModel.java:16)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObject(JsonMessageParser.java:139)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObject(JsonMessageParser.java:152)
        at com.uppaal.engine.protocol.JsonMessageParser.getGenericValue(JsonMessageParser.java:208)
        at com.uppaal.engine.protocol.JsonMessageParser.visitArray(JsonMessageParser.java:176)
        at com.uppaal.engine.protocol.JsonMessageParser.visitArrayField(JsonMessageParser.java:163)
        at com.uppaal.engine.protocol.viewmodel.SuccessorListViewModel.accept(SuccessorListViewModel.java:20)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObject(JsonMessageParser.java:139)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObjectField(JsonMessageParser.java:130)
        at com.uppaal.engine.protocol.viewmodel.GenericResponse.accept(GenericResponse.java:27)
        at com.uppaal.engine.protocol.JsonMessageParser.visitObject(JsonMessageParser.java:139)
        at com.uppaal.engine.protocol.JsonProtocol.getGenericResponse(JsonProtocol.java:432)
        at com.uppaal.engine.protocol.JsonProtocol.getTransitions(JsonProtocol.java:105)
        at com.uppaal.engine.EngineStub.getTransitions(EngineStub.java:687)
        at com.uppaal.engine.Engine.getTransitions(Engine.java:290)
        at on.gU.run(Unknown Source)
Comment 1 Marius Mikučionis 2020-06-08 09:31:07 CEST
I confirm. Thanks for the report.