Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2908 closed defect (fixed)

OMEdit does not update models when submodels are changed

Reported by: Francesco Casella Owned by: Adeel Asghar
Priority: blocker Milestone: 1.9.4
Component: OMEdit Version: trunk
Keywords: Cc: andrea.bartolini@…

Description

Try this experiment with OMEdit.

  1. Create a model A which contains some components (e.g., a step source block and a first order system block), but lacks some required equations (e.g., the connection between the source output and the first order system input).
  2. Create a model B and drag an instance of A in it.
  3. Check model B: one missing equation is reported.
  4. Get back to A and fix it (e.g., connect source and first order system).
  5. Get back to B and check it: one missing equation is still reported.
  6. Only if some changes are done to B (e.g., the icon of the instance of A is moved in the diagram), OMEdit will actually register the changes made to A at step 4., and report a balanced system.

This is a very serious bug, because the internal state of the GUI is at time inconsistent with the internal state of the omc process running in the background and doing all the model processing work.

This bug is probably also related to #2845.

Thanks to Andrea Bartolini for reporting the problem.

Change History (14)

comment:1 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:2 by Adeel Asghar, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in r23367.

comment:3 by massimo ceraolo, 10 years ago

Maybe a further enhancement to the fix of this ticket can be done.

Try this:
1) create a model A that uses a model B
2) modify size and/or position of the string "%name" of model B
3) switch back to model A.

At this point model A should already contain the resized and/or moved name.
Currently, Om r23377 it does not. More in general, it looks like any change in the icon of a model (model B in the example above) icon is not immediately transferred in the models that use it.

Last edited 10 years ago by massimo ceraolo (previous) (diff)

comment:4 by Adeel Asghar, 10 years ago

True. I know this. I won't call this a bug but instead something which I have not implemented (because I didn't get enough time :)). Can you create a new ticket for it? Thanks.

comment:5 by Andrea Bartolini, 10 years ago

With the packages the problem is still present.
I'm working with the linux version (nightly build - r23584), you can try this test:

1) create a new package P, save and close it
2) create a model M into the package P, save and close it
3) re-open the package P: the model M is not shown.... if you now modify the package P and save it then the model M will be lost.

This is a big problem, because it is easy to loose models by this way...

Last edited 10 years ago by Andrea Bartolini (previous) (diff)

comment:6 by Andrea Bartolini, 10 years ago

Resolution: fixed
Status: closedreopened

comment:7 by Andrea Bartolini, 10 years ago

The same patology is present also if you choose to save a package in multiple files.

Test case:
1) create a new package P1 at root level, deselect the "save content in one file" option and save. The file package.mo is created on disk into the folder P1
2) create a new package P2 into the package P1 and save it. The folder "P2" is created on disk into the folder P1 but the file package.mo on disk is not updated. If you now unload the model then the package P2 will be "lost".

This makes impossible to work with multiple file libraries with OMEdit...

Last edited 10 years ago by Andrea Bartolini (previous) (diff)

comment:8 by Christoph <buchner@…>, 10 years ago

Regarding multi-file packages, #2676 is probably connected.

comment:9 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:11 by Adeel Asghar, 9 years ago

Status: reopenedaccepted

This issue has now been fixed in a development branch https://github.com/adeas31/OMEdit/commit/1d15d3b6f76a55c8fd4e3a2e5797dbddc2b60261 for OpenModelica 1.9.4 final release.

Version 0, edited 9 years ago by Adeel Asghar (next)

comment:12 by Adeel Asghar, 9 years ago

Resolution: fixed
Status: acceptedclosed

The fix is now available via the nightly build.

comment:13 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:14 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.