Files "randomly" being deleted

I’ve found a few times recently, some of my files are getting randomly deleted - mostly .script files. I suspect I’m pressing some key combination that’s causing the deletion - just wondered if anyone else had had this issue? It can be a problem as reverting the files takes it back to when it was last sync’d and you can lose some work.

Do you happen to be on Windows with antivirus? We have had reports before where files were quarantined and even deleted.

1 Like

I’m on Windows - no anti-virus though apart from Windows Defender.

For now, I’ve unbound the ‘delete’ key in case I’m pressing it by accident.

This just happened again. The file (a Gui File) doesn’t even appear in the ‘Changed Files’ lists, its just gone. Lost a of work.

Maybe turn on some kind of file sync for faster version control. Dropbox for example may be enough to keep some extra version copies as you save in case it happens again.

Or sync more often.

1 Like

Hmm, can you recall what happened? You created the gui file and added stuff to it. Then what? Did you sync some files? If so, how? Using the built in git tool or something external? Did you rename something? Maybe a containing folder? Did you do some other file operation? Where is Defold installed?

1 Like

It seems to happen when I save and run my game. It’s tricky to spot because the build process doesn’t notice the deleted file straight away and the game still runs fine.

I realise this is a really vague bug report and one hard to reproduce. The problem has happened with with .go .script and .gui files. I unbound the delete key to see if I was accidently pressing it but it still happened.

If I can find a reliable way of reproducing the problem I’ll report back, otherwise there’s probably not much that can be done if I’m the only one experiencing it.

1 Like

Yeah, I haven’t heard of this happening to others, at least not recently. Please let us know if you figure it out!

1 Like

I’d try to detect what process actually removes the file, using the Process Monitor.

Start by setting up a filter for files under your local branch of the project, and test the filter by manually delete a file from there. After that, you should be able to have that process monitor running, and eventually you should see when it got removed, and by what process.

4 Likes

A bit more information on this issue (Win10)

The deletion occurs when doing a “Save All” by pressing Ctrl+Shift+S. In the main window the file that gets delete very briefly changes to white with one line of text beginning “Resourse without…”. It’s only a split second though so I haven’t caught the full error message.

Additionally, sometimes the Changed Files window appears empty until I save a file again.

Finally, the follow error message pops up occasionally:

What are the permissions of the folder?

Do you have OneDrive installed?

Permissions are:

Full control
Modify
Read & execute
List folder contents
Read
Write

OneDrive is not installed - Google Drive is but doesn’t scan my Defold stuff.

I have exactly the same problem :confused:

Hi @Deividas_Krunkauskas.
What os do you run? Do you have any any antivirus running? Have you tried finding what process removes the file? (See my tip about Process Monitor, if you happen to be on Windows)

W10, only windows defender, guess i’ll try to monitor it , because when it happened twice in a row, i felt sad inside :smiley:

1 Like

FYI since running Defold with Administrator privileges on Win10, I’ve not had any more files deleted unexpectedly.

1 Like

I had a similar sensation today where files have been deleted. In the end the problem was that i used the undo-command in the file explorer by accident. So to prevent such mistakes i suggest editing the key bindings to only allow undo in the editors.

1 Like

Ok, that is good to hear! Should we mark this as solved? It would have been nice to get some kind of definitive confirmation of what caused the files to be removed.

1 Like

I wouldn’t really class it as ‘solved’ - I’ve got a workaround that seems to work for me. I’m still getting error messages from time to time when saving followed by a “file has been modified elsewhere - do you wish to reload?” message. I’m not losing work anymore though :slight_smile:

It’s a tough one to pin down as it happened rarely (1-2 times a week)

I understand, but you have not experienced it when running Defold as administrator?