Exception with TSelectorTool and Eurekalog
Posted: 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
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