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
Generating too many news messages at once crashes the game. #7613
Comments
The assert triggers inside the |
With OpenTTD 1.9.2 stable, I can give myself £40 billion, buy exclusive transport rights, fund road reconstruction 64,000 (or 65,500) times, scroll the news message history window all the way down, fund road reconstruction another 4,000 (or 100) times, and the scrollbar will disappear. When I try to scroll again, it will appear that all of the 65,536 oldest news messages got deleted at once, leaving only the newest messages. Note that after 6 months, everything resolves itself due to OpenTTD only keeping the 32 recent news message. In those cases, OpenTTD did not crash. |
Still crashes in 20191006-master-gdd11990ce0. |
Version of OpenTTD
20190525-master-gef74af6766
Expected result
No crash, instead the game deletes old news when the hard limit of 65,535 news messages is reached.
Actual result
When you generate more than 65,535 news messages while having the news message history window open, the game crashes with
Assertion failed at line 673 of d:\a\1\s\src\widget_type.h: num <= MAX_UVALUE(uint16)
= 65,535. Crash info has been generated.Steps to reproduce
There are multiple ways to generate more than 65,535 news messages and crash the game.
Method 1:
Method 2:
The text was updated successfully, but these errors were encountered: