Range check error in ComboBoxWindowProc
Original Reporter info from Mantis: Petr-K
-
Reporter name:
Original Reporter info from Mantis: Petr-K
- Reporter name:
Description:
Sometimes my x64 application dies on Win7 x64.
Crashdump stack trace:
app!fpc_rangeerror+0x1e [..\inc\system.inc @ 747]
app!COMBOBOXWINDOWPROC+0x90
user32!UserCallWinProcCheckWow+0x1ad
Problematic line is:
SetWindowLong(Window, GWL_ID, PtrInt(NCCreateParams^.WinControl));
Function SetWindowLong is defined in unit windows, but last parameter is 32bit - causes sometimes range check.
The same function SetWindowLong is defined in LCLIntf with correct parameters (calls Windows.SetWindowLongPtrW)
Adding LCLIntf after Windows unit solves this issue.
Patch is included. (I must modify one line with func. GetProp - different result type in windows/lclintf)
Mantis conversion info:
- Mantis ID: 31635
- OS: Windows
- OS Build: 7
- Build: 49737
- Platform: Win64
- Version: 1.5 (SVN)
- Fixed in revision: r54600 (#3ded31c9)