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

Random Crash #465

Closed
pedro-walter opened this issue May 23, 2021 · 5 comments
Closed

Random Crash #465

pedro-walter opened this issue May 23, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@pedro-walter
Copy link

Hi folks,

As always, I need to first thank you guys for creating this wonderful mod which keeps me glued to playing this game even after so many years.

Got a random crash happening, not sure if it's a mod problem or a game problem. I made a video explaining the steps to reproduce it:

https://youtu.be/4zonE1wElHQ

And I'm attaching the savegame file, you can also find it here:

https://drive.google.com/file/d/1nWsRsq7T2c5el73sB3Bfg8Lf7prALp8c/view
AutoSave_AD-1534.zip

@pedro-walter
Copy link
Author

For some reason, I tried a few different combination of the commands I've posted in the video without anything triggering the crash, and now when I tried reproducing the error exactly as in the video, it works without a problem. Maybe creating an extra autosave file in the following year, then loading the game kinda fixed the issue, I'm lost :(

@Nightinggale Nightinggale added the bug Something isn't working label May 23, 2021
@Nightinggale
Copy link
Contributor

Nightinggale commented May 23, 2021

I can confirm that it is crashing. It's related to the barbarian player testing CvPlayerAI::AI_professionValue testing UNITAI_DEFENSIVE for PROFESSION_COLONIST. It wants to look up date from getDefaultProfession(), which then crashes because it's NO_PROFESSION.

Looks like a revolting criminal captures La Isabella and then the AI gets confused because the barbarian player lacks settings to run a colony.

Thank you for the savegame. Most likely without knowing it, you managed to provide a savegame where the bug has yet to occur, but it happens when you click end turn. Not only does that allow more detailed examination of the issue, it also allows testing fixes. It is really useful for fixing a bug we didn't know existed.

@Nightinggale Nightinggale self-assigned this May 23, 2021
@Nightinggale
Copy link
Contributor

I got it to not crash meaning I have found the offending code. Now I just have to fix it in a way, which won't be prone to break in the future.

@pedro-walter
Copy link
Author

Glad it was useful!

@Nightinggale
Copy link
Contributor

Fixed in 08052d7
(yes I just noticed the issue number typo... too late to change that now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants