Lost a week's worth of work :(

Summary: I ran the simulator - no errors, but my computer locked up when I tried to close Corona SDK - rebooted and tried to run the project again from CPM. I guess I lost all my work because I tried to run it before I noticed the LUA file was blank - so it overwrote the sandbox version with the blank. Why /how would CPM or Corona SDK erase the LUA file???

Environment:
Windows 7 64-bit, 12G Ram
Corona SDK 2011.484 (2011.4.12)
CPM 2.2.2 using Notepad++

Only one file was erased - the main one I was working in.

I learned years ago to always save your work - but losing work AFTER I saved it is ridiculous. Hopefully it was just a fluke - and not related to CPM or the SDK. But I figure I should make you guys aware of it in case it happens again. [import]uid: 50410 topic_id: 9327 reply_id: 309327[/import]

Hey there :frowning:

I’m so sorry to hear about you losing your work; I know it doesn’t help now but when you’re working on something important, especially something using Lua that you are constantly changing and could break at some point anyway and wish to revert, it’s always a good idea to keep at least one working backup, preferably two. (I keep four copies; one on a laptop, one on a desktop, one an external drive and one on my partner’s computer - soon I’ll also be storing backups on a server.)

Sadly when working with computers things like this do happen from time to time, however I haven’t seen anyone else have this problem (and I’ve been here a while now), so I’d start keeping backups and not worry overly about it unless it happens again.

Again, very sorry to hear about your file.

Peach [import]uid: 52491 topic_id: 9327 reply_id: 34214[/import]

Even better solution is using version control system. There are free SVN and GIT repositories. Just google it. [import]uid: 22837 topic_id: 9327 reply_id: 34236[/import]

Actually, I would recommend Mercurial. It’s as good as GIT and you get unlimited disk space for your PRIVATE repositories on BitBucket (unlike GitHub for example).

As for your problem, it’s more likely CPM fault than Corona. [import]uid: 51516 topic_id: 9327 reply_id: 34238[/import]

Or even DropBox can save your bacon in that situation :wink: [import]uid: 8600 topic_id: 9327 reply_id: 34243[/import]

My suggestion is the least modern and “techy”.

I should be ashamed of myself :frowning: [import]uid: 52491 topic_id: 9327 reply_id: 34245[/import]

Hehe dont feel too bad Peach, I was using your method until about 6 months ago… wouldn’t go back now though :slight_smile: [import]uid: 8600 topic_id: 9327 reply_id: 34249[/import]

Man, I hate to hear stuff like that – especially when my product is involved. While the Windows version hasn’t been tested as extensively as the Mac version, they both use the same code base, including the editor.

I wonder if CPM had the file open when you had to reboot the computer and that caused the problem?

But you also say you were using Notepad++, so does that mean you use it as an external editor and are NOT using the internal CPM editor? If that’s the case, CPM doesn’t even open any of the source files – just passes the location to the external editor to open.

In any case, it makes me think I need to make sure the backup feature is in one of the next updates. No sense in having to think about that kind of thing if it can be automated.

Jay
[import]uid: 9440 topic_id: 9327 reply_id: 34254[/import]

Jay, I think you’re off the hook - it was an external editor - which is why I didn’t post this in your forum’s support area. :stuck_out_tongue: I should have been more clear that I didn’t think it was CPM. The only way it would be a CPM issue would be because I launched it from within CPM (by hitting the launch button), and the file in the source DIR was blank - and the CPM sandbox’s version was blank… TBH - at this point I think I must have been the cause - so user error in the first place.

In any case - I’m sure it was a fluke, but man - what a scary fluke.

Thanks for all the great advice guys!

I have my own subversion server setup so I’ll start using it.

I am also using notepad++ (for you Windows developers) - and in “Preferences”, you can turn on backups in the “Backup/Auto-Completion” tab.

Simple backup will create a copy of the lua file and add a “.bak” to the filename.

Verbose backup will create a nppBackup folder - and copy a timestamped copy to it every time you save.

[import]uid: 50410 topic_id: 9327 reply_id: 34467[/import]

I learned years ago to always save your work - but losing work AFTER I saved it is ridiculous.

It’s very frustrating but hardly unusual unfortunately. That’s the main reason version control systems exist, and why you should always back up your work.

I have my Corona project in a Dropbox folder so that it will automatically keep backups for me of the last 30 days. The backups are sometimes inconsistent (ie. for reasons that aren’t clear to me, sometimes the last version will be an entire day ago) but it saves my bacon when I make really big boo-boos.

My suggestion is the least modern and “techy”.

The main problem with that approach is that you have to remember to do it. That’s why I like Dropbox so much; the versioning is primitive compared to a version control system like Git or SVN or Mercurial, but you literally don’t have to think about it at all.

I actually do manual backups within Dropbox as well. Whenever I hit a significant milestone I’ll save off a separate directory named after whatever feature I just implemented, so that I’ll have a backup of that version that last indefinitely and not only 30 days. [import]uid: 12108 topic_id: 9327 reply_id: 34472[/import]

The main problem with that approach is that you have to remember to do it.

I’m OCD and it’s part of my behavioral pattern to save and backup everything now, so there’s no risk of that.

Still, I agree most people could easily forget it :wink: [import]uid: 52491 topic_id: 9327 reply_id: 34526[/import]