FS#5378 - [Windows] Crash on clicking anywhere in menu 'cept buttons

Attached to Project: OpenTTD
Opened by Yannis A (Evropi) - Saturday, 01 December 2012, 21:04 GMT
Last edited by Loïc GUILLOUX (glx) - Monday, 03 December 2012, 21:04 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


OS is Windows XP SP3, 32-bit, of course.

Happens in the main menu so I assume it happens everywhere else as well.

See title for how to reproduce.
This task depends upon

Closed by  Loïc GUILLOUX (glx)
Monday, 03 December 2012, 21:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r24780
Comment by Alberth (Alberth) - Sunday, 02 December 2012, 09:53 GMT
I cannot reproduce this in Linux by random clicking.

Can you give the position to click, and what button you use?
Comment by frosch (frosch) - Sunday, 02 December 2012, 11:59 GMT
Usually this is a signed/unsigned issue in some computations.
MSVC sometimes implicitly casts different in formulas, so yeah, most likely MSVC only.
Comment by Loïc GUILLOUX (glx) - Sunday, 02 December 2012, 22:16 GMT
> kernel32.dll!_RaiseException@16() + 0x52 octets
openttd.exe!CustomAbort(int signal=22) Ligne 548 C++
openttd.exe!raise(int signum=22) Ligne 586 + 0x4 octets C
openttd.exe!abort() Ligne 74 + 0x7 octets C
openttd.exe!error(const char * s=0x00ba6bdc, ...) Ligne 120 + 0x5 octets C++
openttd.exe!Window::IsWidgetHighlighted(unsigned char widget_index='<') Ligne 171 C++
openttd.exe!DispatchLeftClickEvent(Window * w=0x0012f43c, int x=97, int y=194, int click_count=1) Ligne 509 + 0x9 octets C++
openttd.exe!MouseLoop(MouseClick click=MC_LEFT, int mousewheel=0) Ligne 2571 C++
openttd.exe!HandleMouseEvents() Ligne 2653 C++
openttd.exe!WndProcGdi(HWND__ * hwnd=0x002b020a, unsigned int msg=513, unsigned int wParam=1, long lParam=35455484) Ligne 497 C++
user32.dll!_InternalCallWinProc@20() + 0x28 octets
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 octets
user32.dll!_DispatchMessageWorker@8() + 0xdc octets
user32.dll!_DispatchMessageW@4() + 0xf octets
openttd.exe!VideoDriver_Win32::MainLoop() Ligne 977 C++
openttd.exe!ttd_main(int argc=1, char * * argv=0x0012fe30) Ligne 850 C++
openttd.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00152367, int nCmdShow=1) Ligne 464 + 0x9 octets C++
openttd.exe!__tmainCRTStartup() Ligne 275 + 0x1c octets C
kernel32.dll!_BaseProcessStart@4() + 0x23 octets