TAdvToolbar EArgumentOutOfRangeException

A customer received an EArgumentOutOfRangeException in the TAdvToolbar's SetToolBarTopAndHeight procedure at this line attempting to GetItem.

    if (ATop <= Items[aAdvToolBar.Row].RowRect.Top - 3) and (ATop >= Items[aAdvToolBar.Row].RowRect.Top - 5)
      and (Items[aAdvToolBar.Row].ToolBarList.Count > 1) then

It was opening and creating a new form that contained the toolbar. I cannot reproduce it, so it may only occur for a particular scenario. Perhaps you can see something that might cause it.

Display mode (from EurekaLog):
\.\DISPLAY1[PRIMARY]: 3840x2160x32 168 DPI @ 0x0, \.\DISPLAY5: 3840x2160x32 144 DPI @ 3840x0

I cannot tell by EurekaLog's screen shot, but the by design, the modal form should appear in the center of the owner's form (poOwnerFormCenter). EurekaLog's screen shot only shows the caller form and the mouse on the button that launches the form that is generating the error.

Delphi 11.2

Stack trace from EurekaLog starting where the user clicked a button to create the modal form:

[00000000002F4371] System.Classes.TCollection.GetItem (Line 6397, "System.Classes.pas")
[0000000001254856] AdvToolBar.TRowCollection.GetItem (Line 26358, "AdvToolBar.pas")
[0000000001255F7F] AdvToolBar.TRowCollection.SetToolBarTopAndHeight (Line 26814, "AdvToolBar.pas")
[000000000122447F] AdvToolBar.TAdvDockPanel.SetToolBarBounds (Line 12283, "AdvToolBar.pas")
[0000000001237468] AdvToolBar.TAdvCustomToolBar.SetBounds (Line 17024, "AdvToolBar.pas")
[0000000000541AAB] Vcl.Controls.TControl.ChangeScale (Line 6307, "Vcl.Controls.pas")
[0000000000553052] Vcl.Controls.TWinControl.ChangeScale (Line 12542, "Vcl.Controls.pas")
[000000000124A2E7] AdvToolBar.TAdvCustomToolBar.ChangeScale (Line 23149, "AdvToolBar.pas")
[000000000054177F] Vcl.Controls.TControl.ScaleForPPI (Line 6262, "Vcl.Controls.pas")
[0000000000552BE7] Vcl.Controls.TWinControl.ScaleForPPI (Line 12455, "Vcl.Controls.pas")
[0000000000552D01] Vcl.Controls.TWinControl.ScaleControlsForDpi (Line 12476, "Vcl.Controls.pas")
[0000000000552D01] -= a recursive area removed =- (Line 4)
[0000000000552BDA] Vcl.Controls.TWinControl.ScaleForPPI (Line 12454, "Vcl.Controls.pas")
[0000000000552D01] Vcl.Controls.TWinControl.ScaleControlsForDpi (Line 12476, "Vcl.Controls.pas")
[00000000006FAF72] Vcl.Forms.TCustomForm.ScaleForPPIRect (Line 4311, "Vcl.Forms.pas")
[0000000000704C6F] Vcl.Forms.TCustomForm.WMDpiChanged (Line 7451, "Vcl.Forms.pas")
[0000000000131F02] System.TObject.Dispatch (Line 18824, "System.pas")
[00000000005451DA] Vcl.Controls.TControl.WndProc (Line 7591, "Vcl.Controls.pas")
[000000000054DF88] Vcl.Controls.TWinControl.WndProc (Line 10638, "Vcl.Controls.pas")
[00000000006FD15E] Vcl.Forms.TCustomForm.WndProc (Line 5013, "Vcl.Forms.pas")
[000000000054CE9A] Vcl.Controls.TWinControl.MainWndProc (Line 10315, "Vcl.Controls.pas")
[0000000000319E54] System.Classes.StdWndProc (Line 18507, "System.Classes.pas")
[00007FF9C092826B] USER32 (possible DispatchMessageW+1851)
[00007FF9C0927F27] USER32 (possible DispatchMessageW+1015)
[00007FF9C0938276] USER32 (possible DestroyIcon+86)
[00007FF9C2AB2E3F] ntdll.KiUserCallbackDispatcher
[00007FF9C07D18D4] win32u.NtUserSetWindowPos
[000000000055299E] Vcl.Controls.TWinControl.SetBounds (Line 12417, "Vcl.Controls.pas")
[00000000006FFD7B] Vcl.Forms.TCustomForm.SetWindowToMonitor (Line 5850, "Vcl.Forms.pas")
[00000000006FC400] Vcl.Forms.TCustomForm.SetVisible (Line 4702, "Vcl.Forms.pas")
[00000000007065D0] Vcl.Forms.TCustomForm.Show (Line 7938, "Vcl.Forms.pas")
[000000000070692F] Vcl.Forms.TCustomForm.ShowModal (Line 8011, "Vcl.Forms.pas")
[0000000002D288AB] Form.ReportSummaryLayoutManager.TfrmReportSummaryLayoutManager.DisplayModal (Line 520, "Form.ReportSummaryLayoutManager.pas")
[0000000002E76A55] Form.ReportSummary.TfrmReportSummary.btnManagerItemLayoutsClick (Line 401, "Form.ReportSummary.pas")
[0000000000545A86] Vcl.Controls.TControl.Click (Line 7707, "Vcl.Controls.pas")
[00000000012C611E] AdvGlowButton.TAdvCustomGlowButton.Click (Line 3746, "AdvGlowButton.pas")
[0000000000546379] Vcl.Controls.TControl.WMLButtonUp (Line 7846, "Vcl.Controls.pas")
[00000000012C781F] AdvGlowButton.TAdvCustomGlowButton.WMLButtonUp (Line 4289, "AdvGlowButton.pas")
[0000000000131F02] System.TObject.Dispatch (Line 18824, "System.pas")
[00000000005451DA] Vcl.Controls.TControl.WndProc (Line 7591, "Vcl.Controls.pas")
[000000000054DF88] Vcl.Controls.TWinControl.WndProc (Line 10638, "Vcl.Controls.pas")
[000000000054CE9A] Vcl.Controls.TWinControl.MainWndProc (Line 10315, "Vcl.Controls.pas")
[0000000000319E54] System.Classes.StdWndProc (Line 18507, "System.Classes.pas")
[00007FF9C092826B] USER32 (possible DispatchMessageW+1851)
[00007FF9C0927D2C] USER32 (possible DispatchMessageW+508)
[000000000070F348] Vcl.Forms.TApplication.ProcessMessage (Line 11460, "Vcl.Forms.pas")
[000000000070F3C4] Vcl.Forms.TApplication.HandleMessage (Line 11490, "Vcl.Forms.pas")
[00000000007069F0] Vcl.Forms.TCustomForm.ShowModal (Line 8031, "Vcl.Forms.pas")
[0000000002E75DC6] Form.ReportSummary.TfrmReportSummary.DisplayModal (Line 189, "Form.ReportSummary.pas")

Not sure how this got called with a row out of bounds, but we added a safeguard against this that will be included in the next update

Just an FYI... Never received this error over the past several years and just received the same error from a different customer opening a different form that also had a toolbar. Not sure when it may have started, but somewhat recently. We had in production for about 2 weeks before updating to for about 2 weeks. Then updated to for less than a week where we now how two instances of the same error. So it is hard to say exactly which version it started on due to the short periods for each version in the field, but I'm guessing either or

I'm wondering if it is related to another ticket about positioning of the toolbars at Windows scaling > 100% even though it is something we've been doing for years but never had this argument out of range error in the past.
TAdvToolbar TAdvDockPanel positioning issue at display scaling > 100% - VCL / TMS VCL UI Pack - TMS Support Center (tmssoftware.com)