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]: OpenTTD 12.0 crashes on startup when zoom_min / zoom_max config values are non-default #9622

Closed
Laszlo65 opened this issue Oct 17, 2021 · 7 comments · Fixed by #9633

Comments

@Laszlo65
Copy link

Laszlo65 commented Oct 17, 2021

Version of OpenTTD

12.0

Steps to reproduce

The game crashed.

Upload crash files

OpenTTD.zip

@Laszlo65 Laszlo65 changed the title OpenTTD 1.11 crashes on startup[Crash]: OpenTTD 1.12 crashes on startup[Crash]: Oct 17, 2021
@Laszlo65 Laszlo65 changed the title OpenTTD 1.12 crashes on startup[Crash]: OpenTTD 12.0 crashes on startup[Crash]: Oct 17, 2021
@James103
Copy link
Contributor

Loading the attached save game crashes version 86c295b with:
Assertion failed at line 227 of D:\a\OpenTTD\OpenTTD\src\road.h: roadtype < ROADTYPE_END

crash.zip

@glx22
Copy link
Contributor

glx22 commented Oct 17, 2021

Original dump

>	openttd.exe!Blitter_32bppOptimized::Draw<0,0>(const Blitter::BlitterParams * bp, ZoomLevel zoom) Ligne 221	C++
 	openttd.exe!GfxBlitter<4,0>(const Sprite * const sprite, int x, int y, BlitterMode mode, const SubSprite * const sub, unsigned int sprite_id, ZoomLevel zoom, const DrawPixelInfo *) Ligne 1187	C++
 	openttd.exe!GfxMainBlitterViewport(const Sprite * sprite, int x, int y, BlitterMode mode, const SubSprite * sub, unsigned int sprite_id) Ligne 1233	C++
 	openttd.exe!DrawSpriteViewport(unsigned int img, unsigned int pal, int x, int y, const SubSprite * sub) Ligne 1030	C++
 	openttd.exe!ViewportDrawTileSprites(const std::vector<TileSpriteToDraw,std::allocator<TileSpriteToDraw>> * tstdv) Ligne 1496	C++
 	openttd.exe!ViewportDoDraw(const Viewport * vp, int left, int top, int right, int bottom) Ligne 1749	C++
 	[Cadre en ligne] openttd.exe!ViewportDraw(const Viewport * vp, int) Ligne 1803	C++
 	openttd.exe!Window::DrawViewport() Ligne 1823	C++
 	openttd.exe!NWidgetViewport::Draw(const Window * w) Ligne 2055	C++
 	openttd.exe!NWidgetPIPContainer::Draw(const Window * w) Ligne 1236	C++
 	openttd.exe!Window::DrawWidgets() Ligne 640	C++
 	openttd.exe!MainWindow::OnPaint() Ligne 248	C++
 	openttd.exe!DrawOverlappedWindow(Window * w, int left, int top, int right, int bottom) Ligne 960	C++
 	openttd.exe!DrawOverlappedWindowForAll(int left, int top, int right, int bottom) Ligne 983	C++
 	openttd.exe!RedrawScreenRect(int left, int top, int right, int bottom) Ligne 1589	C++
 	openttd.exe!DoSetViewportPosition(Window::WindowIterator<0> it, int left, int top, int width, int height) Ligne 333	C++
 	openttd.exe!DoSetViewportPosition(Window::WindowIterator<0> it, int left, int top, int width, int height) Ligne 280	C++
 	openttd.exe!SetViewportPosition(Window * w, int x, int y) Ligne 387	C++
 	openttd.exe!UpdateViewportPosition(Window * w) Ligne 1899	C++
 	openttd.exe!SelectGameWindow::OnRealtimeTick(unsigned int delta_ms) Ligne 235	C++
 	openttd.exe!CallWindowRealtimeTickEvent(unsigned int delta_ms) Ligne 3050	C++
 	openttd.exe!UpdateWindows() Ligne 3073	C++
 	openttd.exe!VideoDriver::Tick() Ligne 152	C++
 	openttd.exe!VideoDriver_Win32Base::MainLoop() Ligne 868	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Ligne 804	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Ligne 416	C++
 	[Code externe]	

@glx22
Copy link
Contributor

glx22 commented Oct 17, 2021

James' dump

 	[Code externe]	
>	openttd.exe!HandleSavegameLoadCrash(int signum) Ligne 433	C++
 	openttd.exe!raise(int signum) Ligne 547	C++
 	openttd.exe!abort() Ligne 71	C++
 	openttd.exe!error(const char * s, ...) Ligne 147	C++
 	[Cadre en ligne] openttd.exe!GetRoadTypeInfo(RoadType) Ligne 227	C++
 	[Cadre en ligne] openttd.exe!RoadVehicle::GetMaxTrackSpeed() Ligne 276	C++
 	openttd.exe!GroundVehicle<RoadVehicle,1>::PowerChanged() Ligne 40	C++
 	openttd.exe!AfterLoadVehicles(bool part_of_load) Ligne 414	C++
 	openttd.exe!AfterLoadGame() Ligne 803	C++
 	openttd.exe!DoLoad(LoadFilter * reader, bool load_check) Ligne 3204	C++
 	openttd.exe!SaveOrLoad(const std::string & filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded) Ligne 3313	C++
 	openttd.exe!SafeLoad(const std::string & filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory lf, LoadFilter *) Ligne 941	C++
 	openttd.exe!SwitchToMode(SwitchMode new_mode) Ligne 1038	C++
 	openttd.exe!GameLoop() Ligne 1448	C++
 	openttd.exe!VideoDriver::GameLoop() Ligne 37	C++
 	openttd.exe!VideoDriver::GameThread() Ligne 46	C++
 	openttd.exe!StartNewThread::__l3::<lambda>(const char * name, void(*)(VideoDriver *) && F, VideoDriver * && <A_0>) Ligne 65	C++
 	[Code externe]	
 	openttd.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Ligne 97	C++
 	[Code externe]	

@glx22
Copy link
Contributor

glx22 commented Oct 17, 2021

Ok, trying to load crash.sav is useless here. The crash is in the intro game, and emergency saving adds newgrfs to it, which cause a different crash.

@glx22
Copy link
Contributor

glx22 commented Oct 20, 2021

What's the zoom_in value in [gui] section of your openttd.cfg ?

glx22 added a commit to glx22/OpenTTD that referenced this issue Oct 20, 2021
glx22 added a commit to glx22/OpenTTD that referenced this issue Oct 20, 2021
@Laszlo65
Copy link
Author

Laszlo65 commented Oct 20, 2021 via email

@TrueBrain TrueBrain changed the title OpenTTD 12.0 crashes on startup[Crash]: [Crash]: OpenTTD 12.0 crashes on startup Oct 20, 2021
@glx22
Copy link
Contributor

glx22 commented Oct 20, 2021

Ok, that confirms finding in #9630, for now you can set it to 0 to prevent the crash.

TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this issue Oct 23, 2021
@LordAro LordAro pinned this issue Nov 4, 2021
@LordAro LordAro changed the title [Crash]: OpenTTD 12.0 crashes on startup [Crash]: OpenTTD 12.0 crashes on startup when zoom_in / zoom_out config values are non-default Nov 4, 2021
@LordAro LordAro changed the title [Crash]: OpenTTD 12.0 crashes on startup when zoom_in / zoom_out config values are non-default [Crash]: OpenTTD 12.0 crashes on startup when zoom_min / zoom_max config values are non-default Nov 4, 2021
@LordAro LordAro unpinned this issue Nov 9, 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

Successfully merging a pull request may close this issue.

3 participants