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]: Clicking on "Railroad Construction" #11043

Closed
loadre opened this issue Jun 19, 2023 · 1 comment
Closed

[Crash]: Clicking on "Railroad Construction" #11043

loadre opened this issue Jun 19, 2023 · 1 comment
Labels
bug Something isn't working regression It used to work, and now it's broken.

Comments

@loadre
Copy link

loadre commented Jun 19, 2023

Version of OpenTTD

13.3 Windows 10

Steps to reproduce

  1. Forced a train to ignore the signal
  2. Proceeded to click on railroad construction
  3. Game Crashes

Upload crash files

crash20230619210550.zip

@glx22
Copy link
Contributor

glx22 commented Jun 19, 2023

>	[Cadre en ligne] openttd.exe!HasBit(const RailTypes) Ligne 105	C++
 	openttd.exe!HasRailtypeAvail(const Owner company, const RailType railtype) Ligne 188	C++
 	openttd.exe!ValParamRailtype(const RailType rail) Ligne 208	C++
 	openttd.exe!ShowBuildRailToolbar(RailType) Ligne 860	C++
 	openttd.exe!MenuClickBuildRail(int index) Ligne 924	C++
 	openttd.exe!MainToolbarWindow::OnDropdownSelect(int widget, int index) Ligne 2040	C++
 	openttd.exe!Window::OnDropdownClose(Point pt, int widget, int index, bool instant_close) Ligne 305	C++
 	openttd.exe!DropdownWindow::Close() Ligne 200	C++
 	openttd.exe!SetFocusedWindow(Window * w) Ligne 472	C++
 	openttd.exe!Window::InitializeData(int window_number) Ligne 1444	C++
 	openttd.exe!Window::FinishInitNested(int window_number) Ligne 1794	C++
 	openttd.exe!NewsWindow::NewsWindow(WindowDesc * desc, const NewsItem * ni) Ligne 311	C++
 	openttd.exe!ShowNewspaper(const NewsItem * ni) Ligne 621	C++
 	openttd.exe!MoveToNextNewsItem() Ligne 741	C++
 	openttd.exe!StateGameLoop() Ligne 1429	C++
 	openttd.exe!GameLoop() Ligne 1513	C++
 	openttd.exe!VideoDriver::GameLoop() Ligne 38	C++
 	openttd.exe!VideoDriver::GameThread() Ligne 47	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]	

For some yet unknown reasons, _current_company is OWNER_NONE in ValParamRailtype(), leading to crash in HasRailtypeAvail()

Edit: oh I think I see what happens, a news window pops, get focused, which closes the dropdown, ...

@glx22 glx22 added bug Something isn't working regression It used to work, and now it's broken. labels Jun 19, 2023
PeterN added a commit to PeterN/OpenTTD that referenced this issue Jun 20, 2023
…ost.

Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.
@PeterN PeterN closed this as completed in b68d56d Jun 20, 2023
LordAro pushed a commit to LordAro/OpenTTD that referenced this issue Jun 28, 2023
…ost. (OpenTTD#11044)

Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.
LordAro pushed a commit that referenced this issue Jun 28, 2023
…11044)

Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.
mrmbernardi pushed a commit to mrmbernardi/OpenTTD that referenced this issue Jul 2, 2023
…ost. (OpenTTD#11044)

Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.
shoter pushed a commit to shoter/OpenTTD that referenced this issue Jul 16, 2023
…ost. (OpenTTD#11044)

Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.
@2TallTyler 2TallTyler mentioned this issue Aug 9, 2023
@James103 James103 mentioned this issue Sep 14, 2023
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

2 participants