Why is xojo not having a "unsaved change" after a crash

Xojo (2016r4) did crash unexpectedly. Normally when you start Xojo after this it will tell me it has unsaved changes and ask if I want to load them.

However, now it did not and I just had an hour of changes which seems to be lost.

I found a directory and according me it contains the unsaved changes. This is in C:\Users\Rob\AppData\GUI_v0_3.xojo_binary_project [74690950]. All the files do have extension .o

It contains all files created at the time prior the crash.

Does somebody have an idea how I can recover them with Xojo?

@Rob Valk — Autosaving in Xojo is just a failsafe but you cannot make changes for 1 hour without ever saving your changes.

Sorry to say that, but it is entirely your fault here (even if all of us has made the same mistake in the past).

It may be a good idea to define where it’s saved and keep the last 10 project saved there.
Maybe worth a feedback case?

[quote=454296:@StphaneMons]@Rob Valk Autosaving in Xojo is just a failsafe but you cannot make changes for 1 hour without ever saving your changes.

Sorry to say that, but it is entirely your fault here (even if all of us has made the same mistake in the past).[/quote]
Yes Stephane, I know this is entirely my fault. Normally I automatically do ctr-s + ctrl-r, but it seems I did forgot it this time and I am punished for it directly. Xojo did crash a couple of times before, but because of my automatic behavior I never lost updates on a project before.

[quote=454300:@Christian Schmitz]It may be a good idea to define where it’s saved and keep the last 10 project saved there.
Maybe worth a feedback case?[/quote]
Normally when I finish for the day I copy the bin file and paste it in my backup directory and rename it to <project_name>v(version#)<updaten#>. Just a habit, so in the time I am busy I can end up with (max I keep) the last ten versions.

I thought the auto-recovery feature went back to the last build as the files need to be written to disk to allow the compiler to work? it might be an old issue with 2016r4 that it didn’t or are you using 2019r1.1?

Isn’t GIT better at this ?

GIT requires user intervention.
Xojo does incremental saves and (for me) usually recovers in case of a crash or I have to reboot

[quote=454365:@Dave S]GIT requires user intervention.
Xojo does incremental saves and (for me) usually recovers in case of a crash or I have to reboot[/quote]
Yes, it did with me too, except the last time.

Well, as a fact of life I redid my thing and directly created a backup myself of it.

I still use 2016r4, because I have a license for this one. I will upgrade to 2019 soon, because I read a lot was fixed in the last years. (call it laziness :slight_smile: )

Hi,
I have template proyect with Xojo script “DoCommand(“SaveFile”)” in it.
Each time debug or build, its save automaticly.

[quote=454378:@Krzysztof Koninski]Hi,
I have template proyect with Xojo script “DoCommand(“SaveFile”)” in it.
Each time debug or build, its save automaticly.
[/quote]
Heya Krzysztof, thank you for your tip. I will directly add this to my project.

I think Xojo only saves “Restore Data” just before you use the Debugger. If you do not start the Debugger, no changes are saved/cached.

You can even make a copy of your project each time you debug.
Create console app which give back name for shell like this:

Dim d As New Date Dim Name As String Name = d.SQLDateTime.ReplaceAll(":","-").ReplaceAll("/","_").ReplaceAll(" ","_") Name = "R:\" + Name + ".xojo_binary_project" Print Name
Left this app in your favorite place.

Then you can put in xojo script like this:

[code]DoCommand(“SaveFile”)

Dim Ret As String
Dim Source As String = “R:\Test.xojo_binary_proyect”
Dim Destiny As String = Trim(DoShellCommand(“R:\Backup.exe”))

Ret = DoShellCommand("copy " + Source + " " + Destiny)[/code]

Then you will have copy of your project each time you debug or build with date and time as name.
Its just example.

Regards,

No, I am using still 2016r4, need to upgrade to 2019…just call me lazy :slight_smile:

<https://xojo.com/issue/56357>

FYI
Run already saves a temporary copy of things
Always has
Thats the autorecovery copy in case the IDE crashes

The rest is a one line script
DoCommand(“SaveFile”)
Put that before the build step for whatever target

[quote=454756:@Norman Palardy]FYI
Run already saves a temporary copy of things
Always has
Thats the autorecovery copy in case the IDE crashes

The rest is a one line script
DoCommand(“SaveFile”)
Put that before the build step for whatever target[/quote]
Thanks! Done.