Jump to content

Map deleted after windows crashed during compile


OCD2

Recommended Posts

Posted

As stated in the title, I just lost my map, due to windows 10 crashing during a test compile.

Trying to open the map file just causes gtkradiant to open a blank unnamed project.  

The previous bsp file is corrupt, I attempt to devmap the file and it prompted something to the effect that it needs version 1 (or 0).

Have I lost all that work permanently?   Is there any way to recover ?

Posted

Is there still a .bak file in the same folder as the .map? If so, copy it for safekeeping immediately. It can be used.

Also, check autosave.map.

If neither of those work - what is the size of your .map file?

OCD2 likes this
Posted

This is also a good opportunity to start making backups. As a coder, I tend to store my data using Git, which gives me a history of every change I've committed so I can go back if something breaks or I don't like a change I made. It also allows me to mirror my data to an offsite server like Github, in case I lose my local data (drive failure, ransomware, file corruption, etc.). It's not ideal for storing large assets like textures and models, but it works. Other solutions might work better for you, but I recommend finding a way to store a history of your changes in the cloud.

OCD2 likes this
Posted
10 hours ago, NAB622 said:

Is there still a .bak file in the same folder as the .map? If so, copy it for safekeeping immediately. It can be used.

Also, check autosave.map.

If neither of those work - what is the size of your .map file?

There is a .bak file, though I do not know how it is useful (aka im educated yet on what a .bak file does), could you please explain?

Autosave did have an earlier build of the map, so not everything was lost.

Posted
57 minutes ago, mrwonko said:

This is also a good opportunity to start making backups. As a coder, I tend to store my data using Git, which gives me a history of every change I've committed so I can go back if something breaks or I don't like a change I made. It also allows me to mirror my data to an offsite server like Github, in case I lose my local data (drive failure, ransomware, file corruption, etc.). It's not ideal for storing large assets like textures and models, but it works. Other solutions might work better for you, but I recommend finding a way to store a history of your changes in the cloud.

Yes,  I suspected that this was a sign that I need to back up any projects from now on, it was frustrating to lose the work.

Posted
2 hours ago, NAB622 said:

Make a copy of the .bak file to somewhere safe, then rename it to .map. Load it and see what you get.


It also "loads" a new unnamed project.     


Luckily, autosave had a portion of the map still saved so I learned my lesson about backing up my files, and can rebuild from there.

 

Posted

If you're okay with rebuilding from the autosave, that's fine. If you'd still like to shoot for restoring what was lost, check the size of the .bak file. If it's anything above 1 KB, the map is in there, but a syntax error is preventing it from loading. Those can be found and fixed in a text editor.

Either way, glad to hear that everything wasn't lost!

Posted
1 hour ago, NAB622 said:

If you're okay with rebuilding from the autosave, that's fine. If you'd still like to shoot for restoring what was lost, check the size of the .bak file. If it's anything above 1 KB, the map is in there, but a syntax error is preventing it from loading. Those can be found and fixed in a text editor.

Either way, glad to hear that everything wasn't lost!

Ive already begun rebuilding,  which wasnt too bad as the scene im working on is template based to a high degree.

Though I would appreciate if you explained how to fix it in a text editor, for future reference.    The bak was 90kb.

Posted

If the .bak file is smaller than the .map file was before the incident, it does not contain everything, as it is literally just a copy of the map file and should be identical in size. Autosave.map would be your best friend in this scenario.

However - most of the time, if you look at brackets and quotes in a text editor, you can generally find the errors in .map and .bak files pretty easily. For instance, if an entity was given a double quote in one of it's values, that might confuse things. When loading a map, I believe the console in Radiant will tell you what line the failure occurred on.

OCD2 likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...