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: cannot dereference end map/set iterator #7098

Closed
SamuXarick opened this issue Jan 25, 2019 · 2 comments
Closed

Crash: cannot dereference end map/set iterator #7098

SamuXarick opened this issue Jan 25, 2019 · 2 comments
Labels
bug Something isn't working regression It used to work, and now it's broken.

Comments

@SamuXarick
Copy link
Contributor

Can only trigger this crash in debug build.

Steps:

  • Start a new game

Crashes exactly here:
05da5a1#diff-2ae6b3007c6f3365cdb8e428dc6439d2R316


Microsoft Visual C++ Runtime Library

Debug Assertion Failed!

Program: ...OpenTTD GitHub\OpenTTD\projects..\objs\x64\Debug\openttd.exe
File: c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xtree
Line: 222

Expression: cannot dereference end map/set iterator

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)


Abortar Repetir Ignorar

@PeterN PeterN added the bug Something isn't working label Jan 25, 2019
@PeterN
Copy link
Member

PeterN commented Jan 25, 2019

Reproduced with MSVC 2017 build. No issue on Linux.

ts.tile_to_new_height does not contain tile. I wonder if the check on line 316 is inverted? It doesn't make sense as is.

@nielsmh nielsmh added the regression It used to work, and now it's broken. label Jan 25, 2019
@nielsmh
Copy link
Contributor

nielsmh commented Jan 25, 2019

That would be the integration of #7061 introducing this bug then.

PeterN added a commit to PeterN/OpenTTD that referenced this issue Jan 25, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this issue Jan 25, 2019
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this issue Mar 11, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression It used to work, and now it's broken.
Projects
None yet
Development

No branches or pull requests

3 participants