#3179 closed defect (fixed)
Automatic saving after model change in OMEdit destroys libraries
Reported by: | Bernhard Thiele | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description
I experienced a bad problem when trying to work with the Modelica_DeviceDrivers library using OMEdit.
Changing a parameter in an example model, e.g., Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager
, and pressing the simulate button will save not only the file to be simulated but resaves the whole library. What is even worse is that it saves it in a different directory structure, i.e., it introduces new directories for packages and their classes that before were saved in package files. As a result the library is broken and messed up (it cannot be reloaded by OMEdit).
If testing with Modelica_DeviceDrivers
please make sure to use the master branch (https://github.com/modelica/Modelica_DeviceDrivers/tree/master) and not the release branch, since the master branch contains some compatibility related fixes that are not yet in the release version.
Change History (8)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
No. The only intention to have this checkbox is to keep it enabled by default. So that if OMEdit crash during simulation then the user data is not lost. However, we need to fix the file saving. There are 2-3 tickets already related to it. We need to use local buffers inside OMEdit to file saving instead of asking OMC to save it.
comment:3 by , 10 years ago
The problem is that it is no use that the model is saved anew since the changes are rendered unusable after the automatic save. I.e., OMEdit is not able to load the library again when it has crashed since the newly saved version conflicts with the old structure which is still present. So disabling this would at least allow one to WORK with OMedit. That changes get lost if one does not save is the normal behaviour on most tools. But having it destroy your library automatically is not. So I strongly recommend to change that default to False
until the save issue is fixed.
comment:5 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|
This issue has now been fixed in a development branch https://github.com/adeas31/OMEdit/commit/1d15d3b6f76a55c8fd4e3a2e5797dbddc2b60261 for OpenModelica 1.9.4 final release.
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The fix is now available via the nightly build.
There finds a checkbox in OMEdit -> Tools -> Options under Simulation saying "Save class before simulation". I'm always unchecking it to avoid unintended surprises. Shouldn't this be the default setting, in particular as saving of multi-file packages does not work yet?