Did C2 destroy my project?

  • R0J0hound you're right. Shame on me i was not reading carefully enough.

    eliasfrost, I will do that if i got something similar later. This time i know that the error came from %Temp%, because my file size should be something like 30mt, but it became more like 60kt after i accidentally deleted my files from Temp. Lol. ATM its just funny, because i already have almost fixed all damages from one little older backup file. Also because i needed to redo something, i learned few better ways to do some scripts i lost.

    Thanks everyone who wanted to help me!

  • Ashley is right and Rojo too. Because no one can predict how the user going to behave.

  • > Just curious if it would be feasible to have c2 extract capx files to another location other than the temp folder when editing? Or I wonder if there's a way to block them from being deleted while the project is open.

    >

    This problem comes up from time to time and I don't really know what to do about it. If you have a bunch of programs open and you wipe your temp folder, is it really surprising to then find out you wiped files that were actively in use by the currently open programs?

    C2 stores a lot of project information in temp because changes shouldn't be saved to your project until you click "save". With .capx files, which are really an entire project folder in a zip, it extracts the entire project to temp and works with everything there until you click save, then it zips the whole temp folder again and overwrites your .capx file. This is essential: nobody wants their file on disk to be modified until they click "save".

    I don't want to make it save anywhere else because the operating system "temp" folder is the correct place to put this. If you do something like open a .capx and then forcibly close C2 (or it crashes), its temp files are all left behind. These kinds of leftover files can accumulate for various reasons, and then you may want to legitimately clean them all up, which standard tools/OS functions can do - just I assumed you'd always do this without any programs actively open!

    So it seems some people run these utilities while their projects are open in C2, and it goes ahead and wipes their currently open work in temp. I think C2 can lock the files to prevent other tools trying to delete them, but I never thought people would try to do this, so now there's all sorts of bits of code scattered all through the C2 codebase which accesses various parts of the project in temp. If I forget just one file, the project will still get corrupted by cleaning temp. So... don't clean temp when apps are using temp files?

    I'm having a problem where the temp files are being deleted randomly without me choosing to do so. I'm not sure why this is happening, but it is annoying when my project suddenly stops working and I find out all the files are missing. What should I do about this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I never had this problem. Sounds like Virus attack but, I am not sure about that.

  • Prominent - it's probably not anything to do with C2, it's probably some other software on your PC.

  • [quote:3a3v3nk7]One workaround for the future could be to use a project folder save instead of capx files.

    THis happened to me 2 or 3 times ; it's something to do with closing with the image editor in some state I think. Couldn't reproduce it. However, having switched to project folders it hasn't happened since.

    As a capx file is just a zipped project file (I think ?), this suggests something is wrong with the zipping, possibly some lock on the graphic image in its local store that stops it being copied into the zip file. I don't think an open write stops you from reading it normally but my vague memories of Windows think there is some exclusive access locking thing ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)