Opened 6 years ago
Closed 6 years ago
#5603 closed defect (invalid)
OMEdit crashes on opening record with array creation in ternary operator
| Reported by: | Owned by: | Adrian Pop | |
|---|---|---|---|
| Priority: | critical | Milestone: | Future |
| Component: | Frontend | Version: | v1.14.0-dev-nightly |
| Keywords: | Cc: |
Description (last modified by )
Dear developer team,
when I open the following two files:
ErrorRecord.mo
record ErrorRecord parameter Boolean someBool = true; final parameter Real someValue = 0.05; parameter SimpleRecord simpleRecord(recordValue1 = someValue - simpleRecord.recordValue2); final parameter Real[1] crash = if true then {1} else array(simpleRecord.recordValue2 for i in 1:1) annotation (Dialog(enable=someBool)); end ErrorRecord;
and
SimpleRecord.mo
record SimpleRecord parameter Real recordValue1 = 1; parameter Real recordValue2 = 1; end SimpleRecord;
in OMEdit and I double click on ErrorRecord.mo, OMEdit crashes.
Oddly enough, if I change some things in ErrorRecord.mo, OMEdit doesn't crash. Those changes are:
- line 4: Change
enable=someBooltoenable=truein the annotation - line 4: Remove the annotation alltogether
- line 5: Remove the definition of
recordValue - line 5: Remove
someValuefrom the definition ofrecordValue
Can you reproduce this behaviour? I'm using the new frontend with -d=newInst
Any help is much appreciated!
Change History (6)
comment:1 by , 6 years ago
| Owner: | changed from to |
|---|---|
| Priority: | high → critical |
| Status: | new → assigned |
comment:2 by , 6 years ago
| Description: | modified (diff) |
|---|---|
| Status: | assigned → accepted |
comment:3 by , 6 years ago
I cannot reproduce this. With or without -d=nfAPI is the same, double click on it in OMEdit opens it. I will try again with a new build.
comment:4 by , 6 years ago
Robert, do you have some additional OMEdit flags in Tools->Options->Simulation besides -d=newInst?
comment:5 by , 6 years ago
Hello Adrian, thank you so much for responding so quickly! I am incredibly sorry.. I opened the model in an older 1.14.0-nightly, with the latest it's working like a charm.
Again, excuse me for any headaches I may have caused and thanks again for looking into it!
comment:6 by , 6 years ago
| Resolution: | → invalid |
|---|---|
| Status: | accepted → closed |

@adrpo, not sure if this is a nfAPI, old API, or NF issue. Can you please have a look and dispatch to the appropriate person?
Thanks!