Opened 8 years ago

Last modified 6 years ago

#4472 closed defect

OMEdit corrupts files — at Version 1

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: blocker Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc:

Description (last modified by massimo ceraolo)

I've been working with one-file packages with OMEdit for a lot of time, recently.
OM version: alpha1 64 bit for windows.

In two occasions suddenly the file containing my models lost the majority of its contents, and, while the model tree was still visible in the Model Browser, many models appeared empty when seen in Text View.
This is an awful event, since one looses everything written since the last time he copied his file to a safe place.

I think we should do two things:
1) mitigate the effects of this dramatic event
2) activate a way to find and fix the cause fast.

Point 1). Maybe we could add a feature so that every time one saves a file, a twin file, e.g. with the extension "bak" is created with the previous version.

Point 2) occurence of this event can be detected. In fact when a model name "MyModel" is present in the Libraries Browser, at least "model MyModel end MyModel;" should be present in the code. So if we try to view (e.g. in text view) a model whose name exists in Libraries Browser, and his code is empty, OMEdit can understand that corruption has occurred. In this case it could display the dialog similar to the one we already have to send a crash report, to send a "corruption report". While this report is sent, the user can be prompted to check his files and the corresponding "bak" versions. The corruption report should contain useful info to replicate the corruption, and then to fix the issue.

Change History (1)

comment:1 by massimo ceraolo, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.