TMS VCL UI Pack 13.6.9.1, TDBAdvGrid 2.8.3.11 (DBAdvGrid.pas), Delphi 13.1, Win64.
TDBGridColumnItem.SetField stores the TField pointer in FField and registers FreeNotification(Grid). When the dataset's fields are destroyed (e.g. a temporary TFDMemTable is closed/freed after loading with PageMode = False), TDBAdvGrid.Notification(opRemove) only handles TField removal if AutoRemoveColumns = True.
With AutoRemoveColumns = False, FField is left dangling. RemoveAllColumns does not clear it either (SetFieldName('') intentionally skips SetField) and keeps the first two column items alive. On the next ActiveChange, SetFieldName → SetField calls FField.RemoveFreeNotification(Grid) on freed memory. In our application this surfaced as a spurious FireDAC [DatS]-38 exception raised from TComponent.RemoveNotification → TObject.Free → TFDDatSObject.Destroy, i.e. the freed TField's memory had been reused by a DatS column of the new dataset.
Suggested fix (mirrors VCL TCustomDBGrid.Notification): in TDBAdvGrid.Notification, for Operation = opRemove and AComponent is TField, set Columns[i].Field := nil for every column whose FField = AComponent, independent of AutoRemoveColumns. Additionally RemoveAllColumns and TDBGridColumnItem.Destroy should release FField via SetField(nil).
Workaround used: for i := 0 to Grid.Columns.Count-1 do Grid.Columns[i].Field := nil; before closing the dataset.