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

Bug 680 - Assert in function gives exception in JSON parsing.
Summary: Assert in function gives exception in JSON parsing.
Status: ASSIGNED
Alias: None
Product: UPPAAL Stratego
Classification: Unclassified
Component: GUI (show other bugs)
Version: 4.1.20-7
Hardware: PC All
: P5 normal
Assignee: Marius Mikučionis
URL:
Depends on:
Blocks:
 
Reported: 2020-06-08 08:58 CEST by Martin Kristjansen
Modified: 2020-06-08 09:31 CEST (History)
0 users

See Also:
Architecture:


Attachments
Minimal model, that reproduces the exception (966 bytes, text/xml)
2020-06-08 08:58 CEST, Martin Kristjansen
Details

Note You need to log in before you can comment on or make changes to this bug.
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.