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]: An AI fills up the maximum memory allocation almost exactly (just a few bytes left) and crashes the game. #9599

Closed
James103 opened this issue Oct 3, 2021 · 1 comment

Comments

@James103
Copy link
Contributor

James103 commented Oct 3, 2021

Version of OpenTTD

20211102-master-ga2cf81e722 and jgrpp-0.43.0 on Windows 10

Steps to reproduce

  1. Set the value of Maximum memory usage per script to 1,024 MiB.
  2. Load the AI attached in the below section.
  3. Start up the AI.
  4. Notice that the game crashes.

A. If you get "Maximum memory allocation exceeded" instead, increase the value of the constant 53214 by the value of ceil(N/16) in Maximum memory allocation exceeded by N bytes while allocating M bytes.

B. If the AI starts up normally and doesn't crash, decrease the value of the constant 53214 until either the game crashes or condition A holds true.

Upload crash files

20211102-master-ga2cf81e722 crashes, but does not produce any crash logs on my system.
The following crash files are from reproducing on jgrpp-0.43.0.
crash-20211003T080806Z.zip

The crashing AI script: _TestAI.zip

@glx22
Copy link
Contributor

glx22 commented Oct 3, 2021

Fixed with #9592.

@glx22 glx22 closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants