Saving/loading: Duplicate instances in runtime

For questions about using Classic.

Post » Wed Dec 09, 2009 12:23 am

I encountered a bug when saving/loading (could be quicksave/quickload or normal save/load command, it doesn't matter) on any cap in runtime mode. Every time you load a saved game, all kinds of objects duplicate inside the game, no matter which.

This could lead to potentially nasty problems by loading a corrupt save file.

You only have to load the cap posted here, use left click to save, and then right click to keep loading. You have to run in debug mode to watch the instance count of each object grow and keep gorwing with each "load". There is no other kind of code here, just the save/load. I placed different objects to show that it happens to all kinds of objects.

One thing I notice is that the "total" objects updates once, but then it keeps silent when I keep loading (although the instances coninue to grow), but if I save, then load (and keep alternating), the object count updates.

Also, when I select the duplicated objects in the debug menu to examine them, sometimes it crashes, sometimes it doesn't (but it usually crashes more than not).

I already posted a bug report about this, but I would like to know if this is known (and maybe rushed to post the bug report), or if is there a way for a workaround on this, since it could be a problem relying on the save/load featru and need specific things like counting objects, or something... or maybe I am only having this problem?

http://www.mediafire.com/file/wktgzuzeg ... veload.cap


Thanks,
Italo F. Capasso B. AKA "Edwood Grant"
B
3
G
4
Posts: 2
Reputation: 1,204

Post » Wed Dec 09, 2009 4:02 am

It only seems to duplicate on the load following a save.
The "duplicate" objects are not rendered nor do they activate events, so I don't see this being a huge problem. The only thing they seem to effect is the total object count. If you have a count for a specific sprite, it stays at one.
Also, if you inspect the elements through the debug screen, construct crashes.

Just confirming that it's not only you ;]
B
1
G
3
Posts: 5
Reputation: 835

Post » Tue Jan 26, 2010 1:17 am

Yes, I get this also, however, as well as duplication objects, saving then loading the game also screws up my animation system somehow. Interestingly, if you use the debug to try to check the properties of objects duplicated by this bug, Construct crashes. I'll post an example to the bug reporter shortly.

- Tom
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Tue Jan 26, 2010 9:56 am

For the record, the bug in the original post was fixed in a recent build, and solely affected the object count, rather than spawning ghost objects or anything like that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Jan 26, 2010 3:28 pm

OK, I'll hold off on bug reports 'til I've tested it in a newer build then. Not sure if the animation issue is down to the same bug, but I'll keep you posted.

- Tom
B
2
S
1
G
5
Posts: 50
Reputation: 1,500


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests