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

Crash Site crashes & altered guard behavior on Pelagic II #529

Open
ZenithMDC opened this issue Nov 14, 2024 · 5 comments
Open

Crash Site crashes & altered guard behavior on Pelagic II #529

ZenithMDC opened this issue Nov 14, 2024 · 5 comments

Comments

@ZenithMDC
Copy link

ZenithMDC commented Nov 14, 2024

The x64 port should be considered an experimental branch. After testing it, Crash Site no longer loads (only for the x64 build), the guard behavior on Pelagic II has changed (for both x86 and x64 builds), and probably several other things are subtly, or not so subtly, incorrect. So, please, consider undoing the merging of these two branches until the x64 port is considered stable.

Crash Site message:

Fatal error: overflow when trying to preprocess a bg room, size 64 newsize 80

Every other map in the game loads without issue, including Combat Sim maps.

Pelagic II clips (pre-merge behavior Vs. post-merge behavior, both using x86 build):
Pre: https://github.com/user-attachments/assets/fa047f47-a1b7-428e-8c61-b6c53349d258
Post: https://github.com/user-attachments/assets/a57ac483-bff8-4212-8fbc-ff165cf225d7

@LonelySpaceDetective
Copy link

LonelySpaceDetective commented Nov 14, 2024

I can confirm the reported behavior here on Windows builds, though with one caveat: The original Pelagic II behavior of the other guard running over to check on his dead buddy can still happen, but it's fairly uncommon. It feels as if guard behavior that wasn't originally randomized now is.

As for my take on splitting this into an experimental branch, I'm a non-programmer and do not wish to make assumptions about the 64-bit transition one way or the other, but I do think it's prudent to mention #528 as another issue with the 64-bit transition.

@fgsfdsfgs
Copy link
Owner

fgsfdsfgs commented Nov 14, 2024

Do not panic. Both of the issues from the OP have actually been introduced by the changes I made after merging the x64 branch, and one of them I already know how to fix, though I just reached my PC.

The cheats have actually been an issue this whole time, but they only screw up when building the game with -O2. Before that automatic builds were done with -Og. So now that I know that this happens I can look into it.

In general, the port is unstable by nature, and it is through having people test it and find issues like this that it got this far in the first place. Consider that if I hadn't merged it into the main branch, these might have gone unnoticed for much longer.

Additionally, old i686 builds are still available (and here's port-net), and so is the source code (just git checkout the commit from those actions).

UPDATE: The crash is fixed. I've forced -Og on release builds for now, which "fixes" the cheats, though I'll still have to come up with a proper fix for that. Investigating the guards.

@ZenithMDC
Copy link
Author

Sorry. I guess I misunderstood the purpose of the port branch. And, I'll admit, as someone who is looking for bugs to report or things to fix, seeing these issues crop up after I updated to the latest commit freaked me out. Taking source code where the max size is always assumed to be 32-bit and converting it to 64-bit is usually a perilous endeavor, and I assumed they were caused by that. I'll update the title accordingly.

@ZenithMDC ZenithMDC changed the title Please reconsider the merging of port-x64 into port Crash Site crashes & altered guard behavior on Pelagic II Nov 14, 2024
@fgsfdsfgs
Copy link
Owner

Taking source code where the max size is always assumed to be 32-bit and converting it to 64-bit is usually a perilous endeavor

It very much is, and I think we'll see more issues related to it, though probably not very big ones. The port-x64 branch actually was tested by a few people for a pretty long time before I got around to merging it. The PR was opened around a month ago.

I have introduced changes that led to breakage and behavior mismatch before. This is kind of why the port still has the "it's unstable" disclaimer in the README still and I'm not doing actual stable releases.

@fgsfdsfgs
Copy link
Owner

The Pelagic II thing is now "fixed" via rolling back the changes I did to one of the files. Wonder if there's anything else.

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

3 participants