A colleague’s having a WTF moment... A very weird problem that only happens when compiling to 64 bits (XE7).

A colleague’s having a WTF moment... A very weird problem that only happens when compiling to 64 bits (XE7).

An event handler with signature Sender: TObject; ACol, ARow: integer; var EditorType: TEditorType is being called.  In the calling procedure, ACol = 1, and ARow = 0. In the called handler, however, ACol = 0, ARow = , and requesting 'Sender.ClassName' in the debugger says that it's not accessible.

Further tests suggest that in the handler, ACol consistently receives the value that was passed to ARow in the caller, which kinda suggests that there's some kind of alignment problem.

To make matters worse, it's in an event handler for a custom grid descended from a TMS TAdvStringGrid, which the application uses a lot, but this is the only instance where that specific problem occurs. The custom part of the grid hasn't been touched since Delphi 2009.
We haven't been able to reproduce this behaviour elsewhere, either.

Does anybody have a clue what we could do to fix (or even circumvent) this? Or even where we should look?

Comments