[r206] capx and caproj corrupted after save

0 favourites
  • 7 posts
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • Problem Description


    I've been working for 4 months on this project and was still working on it yesterday. My computer crashed yesterday while in sleep mode and I had to restart it. The project was open before the restart but not saving.

    When I tried to open the project today, it said the file can't open since it's not XML.

    I opened it with Notepad++ but only see NULL values instead of XML...

    I do not have any backup, my computer being quite slow and the project quite big, I had disabled this option and I only have a 1 month old backup.

    Is there any way to retrieve the correct XML from the corrupted file ? Or at least a part ?

    The capx backup is also corrupted and I can't open it with 7-zip...

    Attach a Capx


    Description of Capx

    Caproj contains the XML data of the project

    Steps to Reproduce Bug

    • Step 1 : Open caproj with text editor

    Observed Result

    Only NULL values appear

    Expected Result

    XML appear

    Affected Browsers

    • None

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID


  • If something is so important, then you should always implement a robust backup scenario.

    A .caproj is no good at all - it's only one part of the project. You would need to either provide a .capx or the whole project as a zip file.

    Are you certain you haven't got a autobackup or autosave file? Because without them, you have unfortunately learnt a hard lesson about backing up.

  • Sorry, there is nothing we can do to recover a file if it is empty, and there is nothing we can do to fix the bug without the steps to reproduce the problem in the first place.

    All digital work is susceptible to loss from a range of issues from bugs to failing hardware. Construct 2 has built-in backup options to help protect you from this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I thought so but just wanted to give it a shot.

    I tried some zip repair software but the caproj is not present in the capx backup.

    Well that'll teach me to be more careful.

    Thanks for the help

  • HI Ashley,

    After checking the content of the project folder, it appears I might have found a solution to retrieve at least 80% of the project.

    The bug actually only erased 2 Sheets and layout XML files while the rest of images and other XML were fine in the caproj folder.

    So I just replaced the missing XML by their old version from 1 month ago I had in another caproj folder and I also replaced the caproj which was corrupted by the 1 month old version

    Of course, a lot of objects were missing and the caproj had a lot of missing layouts and event sheets. However each time I opened the caproj, Construct 2 displayed a warning message with the file and line having the missing object and I've been able to add manually the XML node missing each time. Also put the missing object into the correct family I could remember.

    Overall, I had about 40 missing objects and using this method allowed me to keep the objects, conditions and events from the latest version. Only 2 layout got switched back to their 1 month old version but it's better than losing everything and they're not that big.

    The only thing I did not figure out in the XML files is the SID attribute in each nodes. Since I duplicated similar object to fill the blanks, I have many identical SID in the new objects. I thought it might be a problem but after successfully launching the caproj while having most of the recent version content and also successfully launching the game in the browser, I'm not sure what this SID is used for. Is it just a random unique ID created by the software or is there a real use to it ?

    I know using such a method must sound horrible but so far, it seemed to work fine. As long as it works, I don't mind using it.

  • Daedolon - the SID must be unique for every object. It is just a random number. It is used by the savegame and multiplayer systems to uniquely identify objects without relying on their name (which would break if you renamed them) - so those features will be broken if multiple objects share SIDs.

  • Got it ! I'll make them unique to be sure but my game use a custom save system and doesn't use multiplayer object anyway.

    Thanks a lot for the explanations and sorry for the bother. It's really nice to see a developer personally answering to all those bug tickets. It must be a lot of work and I'm really happy I choose Construct 2 for this.

    Good luck !

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