AcessViolation with TAdvOutlookList

Hello,

I have a Problem with the TAdvOutlookList. When I redraw the list (the Data has changed, so I need to) and set the GroupColumn-Option I get an AcessViolation with the following way:
- select more than one Item
- run into a Timer or anything, which changes data and call a refresh
- while the refresh i use "ClearGroups();" and "DeleteAllGroups();" so I need to use "GroupColumn := x;"
- the "refresh"-Task saves which item was selected (by using an key which is hold by the "ItemObject" value) and reselect it afterwards
- after that I press the Shift-Key to select some more of items and on MouseDown it runs into "AddToSelection" and there it stops near the using of "Item" ... somethimes line one sometimes line five but for sure anywhere in this function
I found that the Write-Procedure for GroupColumn copies the whole data and write it back after sorting it. In this case there are some variables which may be released but still accessable.
When I add the following two lines in "TAdvOutlookList.SetGrouping;" I works for me.
---
  // Clean and ReAdd FList Items // Line 4190 (old)
  FList.FocusedItem := nil; // new
  FList.ClearSelection(); // new
  FList.Clear; // Line 4191 (old)
---
I've searched for this issue to long and the project is too complex to extract the code which produced the error (I've tried this but I can't reproduce it easily). So maybe you come to the same result if you have a look for your self.

Friendly greetings from Papenburg, Germany
 Gerit

==============

German / Deutsch (Original)

Hallo zusammen,

Ich habe ein Problem mit der TAdvOutlookList. Wenn ich die Liste neu zeichne (da sich die Daten geändert haben muss ich dies) und setze den Wert für GroupColumn, bekomme ich eine Zugriffsverletzung. Hier eine kurze Beschreibung des Weges:
- Ich wähle mehr als ein Item aus.
- Ich laufe in einen Timer oder ähnliches, welches die Daten ändert. Hierdurch wird die Routine zum neu Zeichnen aufgerufen.
- Während dieser "Neu-Zeichnen"-Routine verwende ich "ClearGroups();" und "DeleteAllGroups();", weshalb ich "GroupColumn" neu setzten muss.
- Der Aufruf, welcher das neu Zeichnen erfordert merkt sich das ausgeählte Item (ein eindeutgier Key wird in "ItemObject" gespeichert) und wählt es anschleßend wieder aus.
- Wenn ich dann mit der Shift-Taste versuche mehrere Items auszuwählen läuft das Programm zunächst ind die MouseDown und darüber in die "AddToSelection"-Methode. Hier stoppt das Programm wenn auf "Item" zugegriffen werden soll. Manchmal schon in Zeile eins manchmal erst in Zeile 5 aber immer in genau dieser Prozedur.
Ich habe herausgefunden, dass die Write-Prozedur für GroupColumn die Daten kopiert, dann sortiert und anschließend wieder zurück schreibt. In diesem Fall werden Variablen erzeugt, auf die zwar noch zugegriffen werden kann, die aber schon freigegeben wurden. Wenn ich die folgenden zwei Zeilen bei mir hinzufüge läuft es wunderbar:
---
  // Clean and ReAdd FList Items // Zeile 4190 (alt)
  FList.FocusedItem := nil; // neu
  FList.ClearSelection(); // neu
  FList.Clear; // Zeile 4191 (alt)
---
Ich habe zu lange nach diesem Fehler gesucht und das Projekt ist einfach zu komplex um "mal eben" ein Projekt mit dem Code zu erstellen, welcher den Fehler enthällt (Ich hab's versucht, aber ich kann den Fehler nicht so einfach reproduzieren). Hoffendlich kommt ihr beim "drüberschauen" zu dem gleichen Ergebnis wie ich.

Freundliche Grüße aus Papenburg, Deutschland
 Gerit

Although we could so far also not reproduce this in a separate project, the suggested modifications are correct and cannot harm other ways of using the component, so we applied these. The next update will have these changes. Thanks.

That would be great. I hate to change source of software-supplier like you are.

Friendly greetings from Papenburg, Germany
 Gerit

==============

German / Deutsch (Original)

Das wäre großartig. Ich ändere nur ungern Quellcode von "Modul-Anbietern" wie euch.

Freundliche Grüße aus Papenburg, Deutschland
 Gerit