Skip to content

Crash from netural company being happy it started my bus but only if I can't pay back my loans #2722

@LeeSpork

Description

@LeeSpork

Version information:

  • Platform: Windows 10
  • Version: 24.10
  • Build/commit: 52acc01

Describe the bug
Very specific and esoteric crash that can happen after losing the game from bankruptcy. Reproducing it in debug mode reveals it to be an access violation crash in Company.cpp's companyEmotionEvent function.

To Reproduce
Method 2

  1. Start a new game. Method may be more consistent in scenarios with not much going on and no AI companies, such as: Scenario.zip
  2. Buy a bus and have it be running.
  3. Go bankrupt (e.g. increase your loan and waste it all on terraforming)
  4. Wait about a month. The game should crash.

Video example of method 2: https://youtu.be/0Kk61ayWOBo (sorry for double audio)

Method 1

  1. Load this save file: save file.zip
  2. Open financial window and attempt to decrease loan (and fail due to not having enough balance) at least twice (apparently?!)
    • Or get lucky (?)
  3. Use extra fast forward to save time. Game will crash specifically on 20 July.

This consistently made the game crash in my testing.

Screenshots
Image

Additional context
The player company has one vehicle in this save: a bus, which was stopped when the company went bankrupt. If you load the save and are lucky enough for it to not crash, you can see the bus is automatically started on July 20, for whatever reason. Crash appears to be the game trying to make the company with ID 15 happy for the bus starting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-openlocoA problem or bug in OpenLoco (but not vanilla)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions