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]: Assertion failed on "Fund new industry" when no industries exist #9546

Closed
James103 opened this issue Sep 9, 2021 · 1 comment · Fixed by #9726
Closed

[Crash]: Assertion failed on "Fund new industry" when no industries exist #9546

James103 opened this issue Sep 9, 2021 · 1 comment · Fixed by #9726
Labels
bug Something isn't working priority: low This issue should be fixed but has either a low impact or is en edge-case

Comments

@James103
Copy link
Contributor

James103 commented Sep 9, 2021

Version of OpenTTD

12.0 beta 2 Windows 10

Steps to reproduce

  1. Install and activate the feature disabler NewGRF, making sure that the parameters are set to remove all industries.
  2. Start a new game.
  3. Click on industry button > "Fund new industries"
  4. The game asserts here:
    const IndustrySpec *GetIndustrySpec(IndustryType thistype)
    {
    assert(thistype < NUM_INDUSTRYTYPES);
    return &_industry_specs[thistype];
    }

Upload crash files

crash.zip

@nielsmh
Copy link
Contributor

nielsmh commented Sep 9, 2021

Starting a game without any industry types available is odd, but I suppose it's a valid game possibility, at least as long as there are some town buildings available that accept and produce some cargo. There can also be situations where all industries are not buildable right now because of year restrictions. So the industries handling should handle the situation where there are no industry types available and no industries on the map, and the situation where there are no industry types available but the map does contain some industries.

@TrueBrain TrueBrain added bug Something isn't working priority: low This issue should be fixed but has either a low impact or is en edge-case labels Sep 14, 2021
@James103 James103 changed the title [Crash]: Assertion failed on "Fund new industry" when no industries or cargos exist [Crash]: Assertion failed on "Fund new industry" when no industries exist Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: low This issue should be fixed but has either a low impact or is en edge-case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants