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

kdtree asserting when removing station #7461

Open
SamuXarick opened this issue Apr 2, 2019 · 3 comments
Open

kdtree asserting when removing station #7461

SamuXarick opened this issue Apr 2, 2019 · 3 comments

Comments

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Apr 2, 2019

Sorry, this crash triggered when I was testing a custom build… will try to see if I can make it crash in master.

Version of OpenTTD

2019-04-02-variable-script_max_op_codes-me1aa0e3e71

Expected result

No crash

Actual result

crash

Steps to reproduce

 	KernelBase.dll!00007ffc3642a388()	Unknown
 	openttd.exe!raise(int signum) Line 516	C++
 	openttd.exe!abort() Line 71	C++
 	openttd.exe!error(const char * s, ...) Line 126	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 213	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::RemoveRecursive(const ViewportSignKdtreeItem & element, unsigned __int64 node_idx, int level) Line 216	C++
 	openttd.exe!Kdtree<ViewportSignKdtreeItem,int (__cdecl*)(ViewportSignKdtreeItem const &,int),int,int>::Remove(const ViewportSignKdtreeItem & element) Line 414	C++
>	openttd.exe!Station::~Station() Line 167	C++
 	[External Code]	
 	[Inline Frame] openttd.exe!StationHandleBigTick(BaseStation *) Line 3271	C++
 	openttd.exe!OnTick_Station() Line 3694	C++
 	openttd.exe!CallLandscapeTick() Line 1397	C++
 	openttd.exe!StateGameLoop() Line 1375	C++
 	openttd.exe!GameLoop() Line 1463	C++
 	openttd.exe!VideoDriver_Win32::MainLoop() Line 1275	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Line 849	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 443	C++
 	[External Code]	

assert(next != INVALID_NODE); // node must exist somewhere and must be found before a leaf is reached
line 213 of kdtree.hpp

@nielsmh

This comment has been minimized.

Copy link
Contributor

@nielsmh nielsmh commented Apr 3, 2019

Need a series of steps to trigger the error, or a savegame that will trigger it.

@SamuXarick

This comment has been minimized.

Copy link
Contributor Author

@SamuXarick SamuXarick commented Apr 3, 2019

Couldn't manage to make it crash in master yet. It was in a all Random AIs + Company Value GS game. Map size wasn't that big, 256x256 if I recall. It crashed rather early too, about a few months into the game.

I'm still trying to make it crash in master.

@SamuXarick

This comment has been minimized.

Copy link
Contributor Author

@SamuXarick SamuXarick commented Apr 4, 2019

OpenTTD.zip - crash files
Crashed again, but not on master. I'm disappointed that I can't be of better help.
EDIT: The exact build was this: SamuXarick@a702fbc

EDIT2: on the savegame, the station is named Funham Central, it's a demolished station at tile 106034, from white company, RoadAI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.