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

Assertion triggered when there is no companies left #4915

Closed
DorpsGek opened this issue Dec 27, 2011 · 3 comments
Closed

Assertion triggered when there is no companies left #4915

DorpsGek opened this issue Dec 27, 2011 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Zuu opened the ticket and wrote:

How to reproduce this:

  1. Start a single player game
  2. Start at least one AI
  3. Make your human company loses money so that it would go bankrupt if it was not protected from bankrupt.
  4. Use switch company cheat to go to one of the AI companies.
  5. After a while the human company will go bankrupt as it is no longer protected.
  6. Pull down the console and write "stopai 1", "stopai 2" ... until all AIs are closed down
  7. When the last company is removed, an assert is triggered "Assertion failed at line 314 of ..\src\economy.cpp: old_owner != _local_company"

I used OpenTTD 1.2-beta1

Reported version: 1.2.0-beta1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4915
@DorpsGek
Copy link
Member Author

Eddi wrote:

IMHO, in step 6, stop_ai should check for _local_company before trying to delete the company


This comment was imported from FlySpray: https://bugs.openttd.org/task/4915#comment10619

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r23680


This comment was imported from FlySpray: https://bugs.openttd.org/task/4915

@DorpsGek
Copy link
Member Author

Zuu wrote:

In the fix, you might want to add/change the log/error message so that it reflects the situation when stopping an AI fails because the human player is in the company.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4915#comment10625

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant