chovy-gm icon indicating copy to clipboard operation
chovy-gm copied to clipboard

Game crashing when big objects persist in room changes

Open m1s3ry opened this issue 4 years ago • 4 comments

Edit: I found out why the game was crashing in the first place: It looks like if you have a big enough object with enough variables that is persistent, when changing rooms the game crashes.

I'm trying to port Super Crate Box. I have the source code and I'm adapting it to the PSP limitations, but the game will crash on startup.

I already ported a super small project and it worked fine, but now I'm porting thos project that's a little bit bigger (around 6mb) and it always crashes the PSP after the splash screen. I don't know what it is, because I'm now testing by creating a previous empty room in the project that does nothing and it still crashes, so it seems to be crashing when loading the game files.

m1s3ry avatar Aug 17 '20 07:08 m1s3ry

6mb project files? gees i didnt even know GM81 could do that shit tbh

LiEnby avatar Sep 02 '20 22:09 LiEnby

I have a workaround. It's not ideal but: I have to write every variable of the persistent object in an ini file, then delete the object before switching rooms, and then creating it again and reading every variable from the ini. Is not ideal in the slightest, but hey, Super Crate Box is running at 60 fps on the PSP!

m1s3ry avatar Sep 08 '20 05:09 m1s3ry

so what persistent objects memory leak? i guess?

LiEnby avatar Sep 09 '20 19:09 LiEnby

I don't know, but memory overflow sure. It seems that GM converted projects with chovy struggle a lot when loading rooms, even if those rooms are empty, so maybe there's the problem. I also found a lot of functions that don't work when converting the projects, but I found workarounds for some of them. I think surfaces related functions also make the game crash, so I had to disable those from the port.

m1s3ry avatar Sep 09 '20 20:09 m1s3ry