TDBAdvGrid Column move after sorting crashes

Hello,


i get a GPF after I move a column with the mouse to a different position when i first sort the grid via a sql order by statement as it shown in the dbAdvGrid example. If I dont sort before moving no GPF occurs. I use PageMode=True and FireDac with an sqLite databse using Delphi 10 Seattle. dbAdvGrid has version 2.3.8.6

Can you reproduce this problem and have a hint whats going wrong here?

My OnCanSort procedure:

 DoSort := False; 
 if gdGrid.SortSettings.Direction = sdAscending then
    gdGrid.SortSettings.Direction := sdDescending
  else
    gdGrid.SortSettings.Direction := sdAscending;

 fldname :=  db.quFillGrid.FieldList.Fields[gdGrid.ColumnAtPosition(ACol) ].FieldName;
 db.quFillGrid.SQL.Text := 'select * from myTable ORDER BY '+fldname;
  if gdGrid.SortSettings.Direction = sdDescending then
   db.quFillGrid.SQL.Text := db.quFillGrid.SQL.Text + ' DESC';
  db.quFillGrid.Active := true;
  gdGrid.SortSettings.Column := ACol;

The GPF:
In Project MyBrowser.exe ist eine Exception der Klasse EAccessViolation mit der Meldung 'Zugriffsverletzung bei Adresse 004CB52F in Modul 'MyBrowser.exe'. Lesen von Adresse 8103013B' aufgetreten.

The line of code which crashes:

procedure TDBGridColumnItem.SetField(Value: TField);
  if Assigned(FField) and Assigned(Grid) then
---->>    FField.RemoveFreeNotification(Grid);           

Structure of My Table:
CREATE TABLE  t(
  id INTEGER PRIMARY KEY,
  Cat VarChar(100),
  ResetNew Integer,
  tID Integer UNIQUE,
  Title VarChar(255),
  ComCnt Integer,
  Seed Integer,
  FileSize VARCHAR(20),
  isNew Integer,
  hasInfo Integer,
  IMDB VarChar(50),
  imdbRating Single,
  imdbVotes Integer,
  Progress Integer,
  DateDown Integer,
  DateUp Integer,
  Marked Integer
);


I have retested this here with enabling column moving in both our ADOSort & BDESort demo but I could not see any issue here. What are your settings for DBAdvGrid.AutoCreateColumns / AutoRemoveColumns? Does it affect the issue when you toggle these settings?

AutoCreateCols is True and AutoRemove is False. It doesn't help if I change this. btw - I tried it on XE7 - it crashes there too.

Did you test & compare with our samples?

I rechecked this today... If I set AtutoRemoveCols to True then it works. Some weeks ago I choosed to set AutoRemove to false by default because I got a problem if its true. Don't remember anymore which problem... Feels again like shipping around bugs :-/