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 will crash after leaving first city in prologue #2

Closed
logdot opened this issue Aug 19, 2022 · 5 comments
Closed

Game will crash after leaving first city in prologue #2

logdot opened this issue Aug 19, 2022 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@logdot
Copy link
Owner

logdot commented Aug 19, 2022

After flying into the first city of the prologue and landing, when you exit to the map the game will crash. No parts seem to attempt to load when the game crashes

@logdot logdot added the bug Something isn't working label Aug 19, 2022
@logdot logdot transferred this issue from logdot/Highfleet-Modloader Sep 3, 2022
@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

Looking into this further, I've found that there doesn't seem to be any difference between the normal steam version of the game and the unpacked version, which is to be expected.

Currently I'm only able to reproduce it using the Hara Vera mod, both the private alpha build and the semi-public alpha v0.1.
I used to encounter the bug in the base game, but I'm no longer encountering it anymore and I'm unsure what has changed.

@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

After a lot of testing I've discovered that it crashes when the OL.seria file has a new part added to it when using the mod, even if the mod doesn't attempt to load that part at all

@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

Creating a dummy part in OL.seria out of a "abstract" part like a rescue order did not cause a crash

@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

I'm now unable to reproduce the bug in a vanilla game either with a clean OL.seria file a an OL.seria file with a dummy part

@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

Scratch everything from before, the bug seems to be time dependent. If you speedrun the first city the game won't crash. If you wait a few seconds after talking to the duke the game won't crash. If you leave at just the right time, the game will crash.

Thanks to this time based nature of the bug I'm going to mark it wontfix, as it only affects the prologue and it would be extremely difficult to properly debug. If this ends up affecting other parts of the game like the campaign, I will open it again.

@logdot logdot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
@logdot logdot added the wontfix This will not be worked on label Sep 7, 2022
logdot added a commit that referenced this issue Sep 7, 2022
This is a very dumb fix, but it works while my understanding of the game
code is still low. The game before assigining all of the parts of the
library checks if that library exists already in memory, if it does it
will call a class function that seems to pertain to the objects
properties.

If the modloader was active this function would fail because the this
pointer would be garbage when calling it. To circunvent this I simply
don't call the function anymore. A better fix would be to investigate
why the this pointer is malformed or only call the function when it's
the expected value (I would assume the global library would always be
the correct one?)

This fixes #1
Further investigation is needed to determine if this affects #2 too, as
I have a suspicion that it might.
@logdot logdot mentioned this issue Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant