Opened 4 years ago

Closed 3 years ago

#6412 closed defect (fixed)

OMEdit crashes when loading the BRSL and instantiating a library item

Reported by: Niklas Worschech Owned by: Adeel Asghar
Priority: high Milestone: 1.18.0
Component: OMEdit Version: 1.16.5
Keywords: OMEdit crashes Cc: Per Östlund, Adrian Pop, Sven.Baetzing@…

Description

If you load the BRSL in OMEdit and expand an element in the library explorer, OMEdit crashes. e.g.

  • Load BRSL\Rexroth_Generic\package.mo
  • Expand Rexroth_Generic.Hydraulics.Examples in the library browser
  • double click InitializationConcept

Attachments (1)

omedit.ini (15.2 KB ) - added by Niklas Worschech 4 years ago.
omedit version

Download all attachments as: .zip

Change History (21)

comment:1 by Francesco Casella, 4 years ago

Cc: Per Östlund Adrian Pop added
Milestone: NeedsInput1.17.1

Let's target this for the 1.17.1 bugfix release.

@adeas31, can you please make a first assessment of what is going wrong?

comment:2 by Adrian Pop, 4 years ago

I could not reproduce this myself with (almost) the latest master. I will recompile and try again.

@niklwors: can you attach your OMEdit settings file: %APPDATA%\openmodelica\omedit.ini
so that we can see if you are using some bad settings. You can zip it with the same password that you used for the libs.

comment:3 by Niklas Worschech, 4 years ago

@adrpo sorry I used 1.16.5, but this version is not availible in the drop down list.
I have attached my file.

by Niklas Worschech, 4 years ago

Attachment: omedit.ini added

omedit version

comment:4 by Adrian Pop, 4 years ago

Version: 1.18.0-dev1.16.5

comment:5 by Adrian Pop, 4 years ago

I added the version so we can properly report bugs for that version.

comment:6 by Adrian Pop, 4 years ago

I tried with v1.16.5 also and still get no crash. Will look into your settings a bit now.

comment:7 by Niklas Worschech, 4 years ago

@adrpo I have reinstalled OpenModelica 1.16.5 and now it works. I have tested it serveral times and it always worked. I'm sorry I dont know what the problem was, but then we can close the ticket.

comment:8 by Niklas Worschech, 4 years ago

Resolution: invalid
Status: newclosed

comment:9 by Francesco Casella, 4 years ago

All's well that ends well :)

comment:10 by Adrian Pop, 4 years ago

Resolution: invalid
Status: closedreopened

In the meantime @niklwors sent via email: "I uninstalled now 1.16.5 and installed 1.17 beta and then it crashes again. But after I restarted OMEdit it works. Is this maybe an installation problem?"

comment:11 by Adrian Pop, 4 years ago

@adeas31, maybe OMEdit doesn't properly read the settings on first run when you switch versions?

comment:12 by Adeel Asghar, 4 years ago

I will test it once the Windows servers are up again.

comment:13 by Niklas Worschech, 4 years ago

Cc: Sven.Baetzing@… added

comment:14 by Adeel Asghar, 4 years ago

I finally managed to test this a bit. The problem is Enable Replaceable Support *. It crashes if you have not enabled it before loading the library and then enable it and try to open the library diagram.

Note the asterisk next to the flag. This indicates that you need to restart after setting this flag. OMEdit somehow end up in weird state if enable/disable of this flag is mixed in one session.

comment:15 by Adeel Asghar, 4 years ago

I also noticed the same in the log sent by Sven. His log file shows that the library is loaded first and then replaceable support is enabled.

comment:16 by Adeel Asghar, 4 years ago

Here is the combination for the crash.

  1. Uncheck Enable Replaceable Support
  2. Close OMEdit
  3. Start OMEdit
  4. Load BRSL
  5. Check Enable Replaceable Support
  6. Expand Rexroth_Generic.Hydraulics.Examples in the library browser
  7. double click InitializationConcept

in reply to:  14 comment:17 by Francesco Casella, 4 years ago

Replying to adeas31:

I finally managed to test this a bit. The problem is Enable Replaceable Support *. It crashes if you have not enabled it before loading the library and then enable it and try to open the library diagram.

Note the asterisk next to the flag. This indicates that you need to restart after setting this flag.

What about detecting that change and suggesting the user to quit OMedit once OK is pressed?

comment:18 by Adeel Asghar, 4 years ago

Maybe. The thing is this is more like a new feature rather than a bug fix so we shouldn't do this for 1.17 and on the other hand perhaps in 1.18 we don't need this flag and have this enabled by default.

in reply to:  18 comment:19 by Francesco Casella, 4 years ago

Replying to adeas31:

Maybe. The thing is this is more like a new feature rather than a bug fix so we shouldn't do this for 1.17 and on the other hand perhaps in 1.18 we don't need this flag and have this enabled by default.

Agreed. I hope they won't be necessary anymore.

comment:20 by Francesco Casella, 3 years ago

Milestone: 1.17.11.18.0
Resolution: fixed
Status: reopenedclosed

This looks to be fixed in 1.18.0

Note: See TracTickets for help on using tickets.