Page 1 of 1

Gantt chart and clear series

Posted: Fri May 24, 2013 12:22 pm
by 16565601
Hi,

i use a TChart with one and unique TGanttSeries that i fill and clear by code. On the application launch the Chart is empty, it is filled up by the result of a search (done by an user).
Then my user can do another search and there the problem occurs, when my code clears of the TGanttSeries with the following statement "MySerie.Clear;"
my application crashes and display the following Exception:

EAccessViolation
Violation d'accès à l'adresse 00403859 dans le module 'VOD_LDS.exe'. Ecriture de l'adresse 00000000.

I decide to test the same action by using the delete method so i did a loop:

for i := MySerie.Count - 1 downto 0 do
MySerie.Delete(i);

And then in this case my app crashed on the deletion of the last element of the serie with the following exception:

EInvalidPointer
Opération de pointeur incorrecte.

I know there is an element "0" because if i stop the loop on 1 for example, on display i can still see the first item of the previous search action mixed with the new ones.

Please help? What did i do wrong?

Tia & BR

Laurent

Re: Gantt chart and clear series

Posted: Fri May 24, 2013 1:39 pm
by 16565601
I played also with the Active property ... no success.
I tried also freeing the Serie and recreating it ... same issue.

Laurent

Re: Gantt chart and clear series

Posted: Fri May 24, 2013 2:38 pm
by narcis
Hi Laurent,

Could you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.