• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Randomly losing asset files

D

DanjelRicci

Guest
I just lost some sprite files after an hour of work, even if I saved every 1-2 minutes or so. The files disappeared from the project folder too. Windows 10, IDE v2.2.2.413, Runtime v2.2.2.326.

How it happened: while normally working with sprites and some scripts, I pressed Play to test my last edits and the editor thrown me a load of errors about duplicate resources. The listed resources were all the sprites I just worked on, and the error literally came out of the blue, I didn't do anything different than I were doing for the last hour or so. Since nothing seemed to throw the error away, I closed and restarted GMS2, the error was gone, and all the resources too.

It's worth noting that all the sprites I lost were moved into a new folder before I started working on them (an hour before the error, in fact). Only one of the sprites survived, I believe because it was the only one still open when the bug happened.

---------------------------

This is the nth time this same issue happened since I started using GMS2 last year; it never hit the project so hard before but now I just lost a good amount of stuff. This is also the major of various consistency bugs we deal with on a daily basis, and no update seem to really fix anything about it. It's just plain maddening.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Where are you storing the project? In a DropBox or Google Drive folder? What about anti-virus programs? Do they include the project location for saving? Or what about auto backup programs? Basically, just about the only time I have seen this issue happen is when some external program interferes with the GMS2 files as they are being saved, so you should check for that.
 
S

syscall

Guest
Oh... a "new folder" issue strike.
That is sad.
Sometimes, when you create a new folder in resources tree, it hangs for a second when you drag files around... Eventually, if you are lucky, it will work fine.
But, sometimes (randomly) it might throw a prompt at you asking you to reload a project or save changes (you should always click on "save changes").
And then, if you're unlucky, it silently messes up a base directory on the "folder" (resource), so after you have moved files into such folder, they are gone... Resulting in that, basically what you just experienced, loss of work.
Because, I think there is a race condition within file system watcher in GMS2 when moving files into a new folder...
Have you checked your project's folder, perhaps the files are still there in the "sprites" folder (check subfolders)? (Try using Explorer file search in your entire project folder, list all *.png files, and then sort by last modified date..)
Perhaps IDE moved the files to the root of your drive, check C:, D: (or whatever drive it is, where your project is located at).

Tip: Only if you use Dropbox (or similar automatic file sync to cloud), and you can't find the sprites on your local system: Just go to version history on Dropbox, you should be able to recover your sprites that way. (Assuming that Dropbox have uploaded your sprite files into cloud.)
Tip 2: If you are using anti-virus program, and aren't downloading weird things from internet, just turn it off while working on the game. Or, if you are paranoid, you should be able to add your project folder into the list of excluded directories (so, anti-virus won't constantly scan your project files).
 
Last edited by a moderator:
D

DanjelRicci

Guest
Sometimes, when you create a new folder in resources tree, it hangs for a second when you drag files around... Eventually, if you are lucky, it will work fine.
But, sometimes (randomly) it might throw a prompt at you asking you to reload a project or save changes (you should always click on "save changes").
And then, if you're unlucky, it silently messes up a base directory on the "folder" (resource), so after you have moved files into such folder, they are gone... Resulting in that, basically what you just experienced, loss of work.
This. 100% this, I'm sure. With the difference that no "project reload popup" came out, the new folder created without problems as far as I could tell. Too bad it was silently waiting to mess up its content... It's like we need a crystal ball to predict what the IDE is plotting.

By the way, I'm using Git only. No automatic backup software, no cloud apps, no antivirus even, nothing at all that could interfere with folders and files. This also happened when I used GMS2 on OSX some months ago, under the same conditions.
Unfortunately the lost files were totally missing from the project foder too, it's not the first time GMS2 deletes stuff without asking or posing the problem. They also aren't on Git since it was all newly created stuff which I was about to commit.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Can you file a bug report please and (if possible) supply the ui.log file (from %programdata%) as well as a link to the project, and also link to this topic?
 
S

syscall

Guest
Perhaps you would like to know:
If you are on Windows, and are compiling the game for Windows platform, you could possibly recover your lost work with some reverse engineering (see my new thread, GMS2TEMP). Given than you have compiled the game at least once while working on the sprites... It might be possible to recover the lost sprites if you still have the folder of when you have compiled the game yesterday (with sprites inside of it).

But, if you have closed the session on GMS2 IDE (like yesterday?), you will probably have nothing in your GMS2TEMP folder, so you can't recover them. :(
 
D

DanjelRicci

Guest
I just sent the bug report but forgot the add link to this topic, damn. I couldn't attach the project due to company policy, but ui.log is there.

Yeah I tested the project yesterday (from the Play button only) but still some of the sprites were created after the last test. I'm making them from scratch.
 
D

Director_X

Guest
I'm making them from scratch.
Perhaps exporting each sprite after you have created it from scratch, will save you future headaches? Always good to have a backup.

Also, there is another thread that might help: HERE
 

rIKmAN

Member
I just sent the bug report but forgot the add link to this topic, damn.
If you login to the help website and look at your ticket there will be an option at the bottom to add more information to it, click that and add the link to this thread.

I do a lot of Resource Tree organising and have never come across this issue, but shall keep my eye out for it.

Perhaps exporting each sprite after you have created it from scratch, will save you future headaches? Always good to have a backup.
Exactly this - always have resources like sprites and sounds stored in a location other than directly in the project itself.
It's unfortunate that OP didn't have time to commit to Git, but this is why backups in another location are sometimes just as important.
 
D

DanjelRicci

Guest
Thanks both! I'm usually not in charge of doing sprites but this has been an unfortunate occurrence. I'll draw and save heavier stuff outside of GM2 next time...

Also, there is another thread that might help: HERE
Ah yeah, this also happens continuosly but I just deal with it. It's never been a real data loss in my case, a quick edit of the YPP file always fixes it.
 
Top