TAdvStringGrid onGridHint List index out of bounds (-1).

Delphi 10.4.2 , 32ibt projects, we've been using the older TMS Component Pack until recently.

We are now on the latest VCL UI Pack instead.

Now, we get List index out of bounds (-1) errors in the onGridHint events.

This is when we try access the ARow variable. As it appears ARow ( and maybe ACol ) are -1 values.

If I revert to my old Virtual Machine with Component Pack and recompile, the error goes away.
As the event is never called with -1 values .

It appears something has changed.

Only way to fix this is add to the event if ARow or ACol are -1 then exit the event.

We have hundred of grids and this event set, for 10 years now, and never been a problem until upgraded to VCL UI Pack usage.

MadExcept reports

exception class    : EListError
exception message  : List index out of bounds (-1).

main thread ($11d0):
008232f4 +0034 cmw.exe      Vcl.Grids       6305   +1 TSparseList.Get
00824c15 +0019 cmw.exe      Vcl.Grids       6954   +1 TStringGrid.GetCells
009704a7 +0073 cmw.exe      BaseGrid        1194   +6 TBaseGrid.GetCellEx
01dacf70 +0038 cmw.exe      frame_Payments   725   +1 TframePayments.PaymentsGridGridHint
00a33ee7 +0047 cmw.exe      AdvGrid        13943   +3 TAdvStringGrid.GetCellHint
00ab221b +060b cmw.exe      AdvGrid        58661 +113 TAdvStringGrid.ShowHintProc
00a78595 +0029 cmw.exe      AdvGrid        38841   +3 TAdvStringGrid.CMHintShow
0063976a +02be cmw.exe      Vcl.Controls    7548  +91 TControl.WndProc
0063e881 +0665 cmw.exe      Vcl.Controls   10583 +170 TWinControl.WndProc
00ab6c63 +1eeb cmw.exe      AdvGrid        60549 +709 TAdvStringGrid.WndProc
006393a0 +0024 cmw.exe      Vcl.Controls    7326  +10 TControl.Perform
00754185 +022d cmw.exe      Vcl.Forms      12412  +36 TApplication.ActivateHint
00753b55 +0039 cmw.exe      Vcl.Forms      12177   +8 TApplication.HintTimerExpired
0074f32e +0022 cmw.exe      Vcl.Forms       9733   +3 HintTimerProc
777a597b +000b USER32.dll                             DispatchMessageW
0075222f +012b cmw.exe      Vcl.Forms      11336  +23 TApplication.ProcessMessage
0075227f +000f cmw.exe      Vcl.Forms      11366   +1 TApplication.HandleMessage
00752643 +00d3 cmw.exe      Vcl.Forms      11505  +27 TApplication.Run
02407606 +25f2 cmw.exe      CMW             1844 +445 initialization
7639fa27 +0017 KERNEL32.DLL                           BaseThreadInitThunk

This isn't every grid either. Not 100% sure the causes yet but its cropped up in testing,
And I just edit the event code to exit out if -1

But as mentioned, roll back to old VM and older TMS code, and problems with this all goes away.

This was a change by design. Returning -1,-1 when the mouse is NOT over a cell but over just the grid background, allows to set a different hint for this area than for cells. So, you should add code to prevent from accessing cells using just the ARow, ACol parameters when these are -1,-1

ugh.. this means changing code for 100s of events... and having QA test every grid in the program for this.
Wish had been an option to toggle this on and off instead... as now i gotta tell project manager why this is and why we have to test for this everywhere.

I understand but it only adds complexity and confusion to add yet another property while a simple test gives flexibility to control cell hints versus grid hint.
We believe it is always good to test indexes when access grid.Cells[col,row]