[Lazarus] range check error with TMainMenu/TMenuItem in win64

Seth Grover sethdgrover at gmail.com
Mon Nov 14 18:55:54 CET 2011


I'm currently running FPC 2.4.4 (built from SVN) on Windows Server
2008 R2 cross-compiling targeting Win64/x86_64. I retrieved lazarus
0.9.30.2_rc2 from subversion and built the LCL to be able to target
win64/x86_64 for GUI apps as well. I then follow these steps:

1. Create a new application
2. Add a TMainMenu to the form
3. Add a single menu item to the main menu

I compile the application for win64/x86_64 and run it. Upon running
the app, I get this:


Range check error.
Press OK to ignore and risk data corruption.
Press Cancel to kill the program.

The backtrace shows:

C:\temp> .\project1.exe
TApplication.HandleException Range check error
  Stack trace:
  $0000000000538059  TWINCONTROL__DOKEYUPBEFOREINTERFACE,  line 5857
of ./include/wincontrol.inc
  $000000000053B49D  TWINCONTROL__CNKEYUP,  line 6970 of
./include/wincontrol.inc
  $000000000040C7D6  TOBJECT__DISPATCH,  line 472 of
C:/cygwin/home/Administrator/devel/fpc/fpc-2.4.4/rtl/inc/objpas.inc
  $0000000000536085  TWINCONTROL__WNDPROC,  line 5241 of
./include/wincontrol.inc
  $000000000041FAE1  TCUSTOMFORM__WNDPROC,  line 1362 of
./include/customform.inc
  $00000000005C12FE  DELIVERMESSAGE,  line 110 of lclmessageglue.pas
  $000000000056D6E8  WINDOWPROC,  line 2441 of win32callback.inc
  $00000000005C3B07  CUSTOMFORMWNDPROC,  line 357 of win32wsforms.pp
  $000000007684C3C1
  $000000000042B442
  $000000000042BB7A
  $000000000042FBDE
  $000000000042BAF4
  $0000000000402AF8

I tried googling for a similar issue but didn't see anything specific
to TMainMenu with win64. I'm sort of baffled by this, since I can't be
the only one out there trying to target win64.

Has anyone else seen this?

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover




More information about the Lazarus mailing list