Exception with TSelectorTool and Eurekalog

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Biologic SAS
Newbie
Newbie
Posts: 2
Joined: Tue Apr 26, 2016 12:00 am

Exception with TSelectorTool and Eurekalog

Post by Biologic SAS » Fri Jun 10, 2022 8:39 am

Hello,

Engineer at Biologic Science Instruments, we use your charts in our softwares with 2016 and 2017 versions.

I contact you about what it seems to be an access violation problem in your component TSelectorTool. Indeed, when using it in a simple graph in delphi with the debugger tool Eurekalog activated, I have an exception message.

To give more precision, I draw a form with delphi with only a TChart with a TSelectorTool. I create this form with Create(nil) departing to the main form, then I destroy it with free. That leads to an Eurekalog error.

I have this exception with "Steema TeeChart Pro VCL FMX 2016.17" (regular) which I regularly use but also with the new trial version. I have not this same error if I use no TSelectorTool, even if I use other tools (axis scroll, nearest points, cursor...). If I use Selector and other tools, I also have the exception.

I entered your source code to try to find a solution and it seems to me that I have found it. It consists to add the command Listeners.Clear in TCustomAxisPanel.Destroy, just before FTools treatment. It permits to liberate the reference to TSelectorTool in Listeners list before the TSelectorTool destruction instead of after, and so prevent the TSlectorTool destruction attempt which occur on a destroyed object when the last reference to TSelectorTool by interface is suppressed (in Listeners). Could you please validate my solution ?



Thanks to the attention that you will give to my message. Feel free to contact us if you need more information.
Best regards.

Anne-Cécile LESART, Engineer at Biologic Science Instruments

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Exception with TSelectorTool and Eurekalog

Post by Yeray » Wed Jun 15, 2022 2:13 pm

Hello,

I don't have EurekaLog here, but I've done a simple example creating a thousand forms containing a TChart with a TBarSeries and a TSelectorTool and, looking at the Task Manager while it does the job, the memory looks stable at about 2,9MB.
SelectorToolMemory.zip
(6.84 KiB) Downloaded 479 times
Feel free to modify the example to reproduce the problem.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Biologic SAS
Newbie
Newbie
Posts: 2
Joined: Tue Apr 26, 2016 12:00 am

Re: Exception with TSelectorTool and Eurekalog

Post by Biologic SAS » Mon Jun 20, 2022 8:36 am

Hello,

I use delphi XE7 and Steema 2017.21 and I haven't Series1.HoverElement. I can suppress it but for reasons I don't understand I don't sucesss in using Eurekalog on your project.

The problem I described is not a memory leak but TChart attempts during its destruction to access memory it had already destroyed (in particular to destroy it another time).

Sorry but I haven't got a lot of time to use on this problem, especially when it seems that I found a solution to suppress it for us.

Best regards

Post Reply