Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game freezes when collecting question mark powerup in SPZ Encore Mode #264

Closed
camthehaxman opened this issue Jan 27, 2024 · 14 comments
Closed

Comments

@camthehaxman
Copy link

According to gdb, it seems to always be in Objects/Global/ItemBox.c:ItemBox_GivePowerup() when I press Ctrl+C during the freeze

Video demonstration:
https://github.com/Rubberduckycooly/Sonic-Mania-Decompilation/assets/155208115/3cc6159d-7b00-4ccc-b322-60bee8f5b51d

Platform: Linux x86-64, GLFW, OpenGL

@camthehaxman
Copy link
Author

After further testing in gdb, it appears that this loop here https://github.com/Rubberduckycooly/Sonic-Mania-Decompilation/blob/master/SonicMania/Objects/Global/ItemBox.c#L608 never exits.

@MegAmi24
Copy link
Member

Not getting this crash on Windows DX9. Might be platform sepecific.

@camthehaxman
Copy link
Author

Here is my SaveData.bin file, since that may be relevant.

SaveData.zip

@GeffDev
Copy link
Contributor

GeffDev commented Jan 27, 2024

fwiw, I can only reproduce this bug on cam's save data.

@LittlePlanetCD
Copy link
Contributor

Here is my SaveData.bin file, since that may be relevant.

SaveData.zip

Your save is just broken. Is this from the steam version, or did this file get created from the decompilation?

@camthehaxman
Copy link
Author

In what way is it broken? I copied it from the Steam version and then played through encore mode up to this point with the decompilation.

@LittlePlanetCD
Copy link
Contributor

In what way is it broken? I copied it from the Steam version and then played through encore mode up to this point with the decompilation.

From what i can tell, it could potentially be a slight save data problem setup issue, but i'd need to see if this is reproducible on steam. using the save file you provided crashes the steam release the same way, so im wondering what could be happening

@camthehaxman
Copy link
Author

I tried copying my save file over to the Steam version, and it froze as well, so it doesn't look like this is a bug with the decomp. I still have no idea how this happened.

@LittlePlanetCD
Copy link
Contributor

LittlePlanetCD commented Jan 27, 2024

image
image

your save data is in an invalid state, you have Tails collected but also not active. you had more than likely broken the save by doing something on the decomp the last time you played.

@camthehaxman
Copy link
Author

Ok, there must be some other bug that caused this save file inconsistency. I swear I didn't use cheats or mods.
What tool are you using to view that information?

@LittlePlanetCD
Copy link
Contributor

i'm using jcfields' Sonic Mania Save Editor to view the save data.

You had Tails unlocked at a certain point in your gameplay, so do you remember what happened to him?

@camthehaxman
Copy link
Author

I do remember using tails in Chemical Plant. I think I died playing as him or something, can't remember. I'll reset back to my original Steam save file (from before I messed with the decomp) and see if I run into this again. I'm going to close this issue for now, unless I figure out a reliable way to reproduce it.

@Mefiresu
Copy link
Member

For what it's worth, I believe that Steam save files may not be 100% compatible with the decomp because Steam Mania is 32bit and the decomp is usually built for 64bit.
I know for a fact that no special serialization method is done by the game, it's a direct dump of a struct data to a file.
This makes a Steam save file not compatible with big endian platforms such as the Wii/WiiU/PS3.

@camthehaxman
Copy link
Author

Yeah, I can see that being a problem. We should byte swap on big endian platforms if we want save files to be interchangeable. The int type is still 32-bit on most 64-bit platforms, but any struct that's being written should be using the fixed width types, and there shouldn't be any pointers within those structs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants