Recover unsaved changes dialog


Recover unsaved changes.png

If you experience an abnormal termination of Analytica, for example from a power outage, battery going dead, unscheduled computer reboot or application crash, the Recover unsaved changes dialog appears the next time you launch Analytica, if you had made changes that were not saved. It gives you an opportunity to recover your changes that would otherwise have been lost.

The buttons

  • Recover now: Press this to recover your changes and get back to where you were before the abnormal termination. This button first loads the most recently saved version of your model, and then reads the recovery file and replays all the changes you made since the previous save. It does not save your model, so as soon as you've recovered, it is a good idea to save.
  • Later: Press this to postpone the recovery, for example, if you want to work on something unrelated right now.
  • Delete: This purges the recovery log, and hence, deletes any unsaved changes. Your model file will still be there in the state it was the last time you saved it, but any changes you made since that last save will be lost forever.
  • Next >>: This shows up when there are two or more models that have had an abnormal termination with unsaved changes. Press this button to advance to the next model with unsaved changes.

Enabling / disabling recovery option

The Maintain recovery info preference controls whether Analytica keeps a record of unsaved changes while you are using it. When this preference is on (and it is on by default as long as you haven't turned it off), then you will have the option to recover unsaved changes in the event of an abnormal termination.

Maintain recovery info2.png

This setting is global to your computer account, not tied to the model, so if you change it, it will say the same when you start a new Analytica session, even if you work on a different model.

We don't recommend turning this setting off, since it puts you at risk of losing work in the event of an abnormal termination.

How it works

As you make changes to your model, Analytica maintains a recovery log, which is an incremental change log. Each time you make a change, a line is appended to the end of the change recovery log file. The recovery log contains all the changes since the last time the model was saved. If you need recover changes, it first loads the previously saved version of your model, and then it replays all the changes from the recovery log. Each time you save your model, the recovery log is deleted, since at that point there are no longer any unsaved changes, and the log starts anew.

The recovery log file often has the same name as your model file, but with a tilde appended. For example, for the model "Mean-reversion trading.ana", the recovery log is named "Mean-reversion trading.ana~". The recovery file has the hidden bit set, so don't normally see it unless you have Window's setting configured to list hidden files. The change log may be in a different directory if the model directory is not writeable. The Recover unsaved changes dialog displays the location of the recovery file where it says "Recovery File".

When you are using Analytica, you can find the location of the recovery log my viewing the value of the system variable AutoSaveFilename.

What to do when recovering changes crashes

If Analytica crashed, there is a chance that the sequence of changes you had made triggered the crash. Since recovery consists of replaying all the changes you made in the previous session, there is a chance that replaying that same sequence of changes will trigger the crash again. It is rare that this occurs, but should it happen to you, it appears to leave you with a dilemma, since every time you attempt to recover changes, it crashes again.

When this happens, then please send a copy of both your model and of the recovery file to support@lumina.com as a bug report (see below). In this case, the bug is entirely reproducible, so these two file together are sufficient for reproducing the problem. Support can also help you identify the culprit.

Next, open the recovery file in a text editor (such as Notepad), delete the last few lines, save it and re-attempt the recovery. By doing this, you are dropping the last few changes that you made, but since the last thing you did was when it crashed, dropping the last few changes usually avoids the crash. If it still crashes, remove more lines from the end until it stops crashing. Once is successfully recovers, save immediately.

Submitting a bug report

If Analytica crashed (abnormally terminated), you may wish to submit a bug report. You can do this by sending the relevant information to support@lumina.com. When you are viewing the Recover unsaved changes dialog, you have an opportunity to attach a copy of your model along with the recovery log in your bug report. These can help to provide clues to Lumina's QA team about what you were doing prior to the crash. This is not a substitute for also providing an exact sequence of steps that you do from within Analytica to reproduce the crash. You should include as much specific information regarding the steps required to reproduce the crash with the report as you can.

When submitting the model file and recovery log, you need to grab them just after the crash, or while you are viewing the Recover unsaved changes dialog. You also need to include both -- the recovery log without the model file is usually not useful (unless the model had never been saved prior to the crash, in which case the recovery log is a complete record). While viewing the dialog, both the model file name and the recovery file name are immediately visible. When you are selecting the file to attach to your email, you may not see the recovery file on the file listing, since it is a hidden file. You should just copy-paste the file name from the Recover unsaved changes dialog into the file selector where it asks for the file name and press OK.

See Also

Comments


You are not allowed to post comments.