[r206] capx and caproj corrupted after save

Bugs will be moved here once resolved.

Post » Sun Aug 09, 2015 10:29 pm

Message: Daedolon can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Problem Description
Hi,
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
http://www.spooky-heroes.com/Spooky%20Heroes.caproj

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
206
B
10
S
2
Posts: 67
Reputation: 690

Post » Mon Aug 10, 2015 6:42 am

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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,487
Reputation: 59,760

Post » Mon Aug 10, 2015 10:36 am

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.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,379

Post » Mon Aug 10, 2015 12:49 pm

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
B
10
S
2
Posts: 67
Reputation: 690

Post » Wed Aug 12, 2015 4:23 pm

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.
B
10
S
2
Posts: 67
Reputation: 690

Post » Mon Aug 17, 2015 1:02 pm

@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.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,379

Post » Fri Aug 21, 2015 8:31 am

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 !
B
10
S
2
Posts: 67
Reputation: 690


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 10 guests