Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2943 closed defect (fixed)

r23100 OMEdit deletes components from model files!

Reported by: Christoph <buchner@…> Owned by: Adrian Pop
Priority: critical Milestone: 1.9.2
Component: Interactive Environment Version: trunk
Keywords: Cc: Per Östlund

Description

I just upgraded from a previous version (either 1.9.1 release or r22990, can't tell which anymore) to r23100, on Windows. OMEdit removes all components from existing model files! Luckily I have my projects under version control, or they would have been made unusable.

I tried to replicate by creating a new simple model. I created a new model, saved it, dragged in 2 Fluid.Vessels.OpenTanks, saved, then connected them, switching back between diagram and text view, and found several issues:
1) apparently, in a new model, the components never get saved to disk (my git client never saw them)
2) it seems that when OMEdit claims to save a file (the asterisk disappears), the file does not in fact get saved to disk, as git didn't show any changes after saving with the two new tanks.
3) In the end, only the connect() equation between the two tanks got saved to disk, which the text view reflected, but the diagram view still insists that the two tanks exist.
4) After unload/load the model is of course totally broken, as there's only connections inside.

Let me repeat that this also happened to already existing models (on first save as far as I could tell). Also, it seems comments get removed, too, but "replaceable package..." statements are unaffected by this.

Attachments (1)

nosave-2943.mos (893 bytes ) - added by Adeel Asghar 10 years ago.

Download all attachments as: .zip

Change History (6)

by Adeel Asghar, 10 years ago

Attachment: nosave-2943.mos added

comment:1 by Adeel Asghar, 10 years ago

Component: OMEditInteractive Environment
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

The problem seems to be with the save API.

comment:2 by Adeel Asghar, 10 years ago

Cc: Per Östlund added

comment:3 by Adrian Pop, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r23123.

comment:4 by Adrian Pop, 10 years ago

Milestone: Future1.9.2

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

Thank you for the fix!

Note: See TracTickets for help on using tickets.