Mega Search
23.2 Million


Sign Up

Make a donation  
TChart XE6 issue with freeing library containing TChart.(Fre  
News Group: embarcadero.public.delphi.reporting-charting

Hi,
We have an application which contains a number of DLLs all built with Delphi XE6. Both the application and DLLs are build with "link with runtime packages". The VCL package is entered in both projects as "Runtime Package".

We load the DLLs once the application has started.

When we try to unload (FreeLibrary) the DLLs, the application freezes once it gets to the DLL containing TChart.

If we remove TChart from that DLL it will unload/free it without any issues.

Was working without any issues in all versions up to XE3 - Does not work with XE6 / XE6 Update 1. Latest version of TeeChart for XE6 is installed. v2014.11.14512 

This needs to be fixed ASAP.

Also posted on QC with attached project and steps to reproduce.
http://qc.embarcadero.com/wc/qcmain.aspx?d=125802

Thanks,
Lukasz

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 2-Jul-2014, at 7:13 PM EST
From: Lukasz Rewak
 
Re: TChart XE6 issue with freeing library containing TChart.  
News Group: embarcadero.public.delphi.reporting-charting
Hello Lukasz,

> {quote:title=Lukasz Rewak wrote:}{quote}
> When we try to unload (FreeLibrary) the DLLs, the application freezes once it gets to the DLL containing TChart.
> 
> If we remove TChart from that DLL it will unload/free it without any issues.

We've checked this is the same problem discussed [here|https://forums.embarcadero.com/thread.jspa?threadID=80311]: If you use GDIPlus inside a dll, you have to manually initialize it from the exe that is loading the dll.

> {quote:title=Lukasz Rewak wrote:}{quote}
> Was working without any issues in all versions up to XE3 - Does not work with XE6 / XE6 Update 1. Latest version of TeeChart for XE6 is installed. v2014.11.14512 
This is because TeeChart v2014 is the first version to use GDIPlus by default.
You can change this back to GDI at design time through the "Options..." dialog.

> {quote:title=Lukasz Rewak wrote:}{quote}
> Also posted on QC with attached project and steps to reproduce.
> http://qc.embarcadero.com/wc/qcmain.aspx?d=125802
I've added a comment there.
--
Best Regards

Yeray Alonso
Steema Support Central
Follow us in [url=http://twitter.com/SteemaSoftware]Twitter[/url] and [url=https://www.facebook.com/SteemaSoftware]Facebook[/url]

"Important note: If you are a TeeChart registered customer,
please post your support questions at Steema's Support
monitored Forums for a prompter reply."
http://support.steema.com

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Jul-2014, at 4:34 AM EST
From: Yeray Alonso
 
Re: TChart XE6 issue with freeing library containing TChart.  
News Group: embarcadero.public.delphi.reporting-charting
Hello Yeray,

Thank you for your suggestion. We have tried it, but it did not work. If we change the Rendering Options from GDI+ to GDI, the application still hangs. We believe this is because the unit "VclTee.TeeGDIPlus" is still included in the uses clause, and as soon as you have the "VclTee.TeeGDIPlus" included (even if you have removed the actual component from your form), the application fails / hangs on FreeLibrary. And the problem is that even if you remove the "VclTee.TeeGDIPlus" unit from the uses clause, the
 compiler adds it automatically - even if the Chart component is set to use only GDI render - not GDI+.

Is there anything else we can do? We can't be rewriting our system to use GDIplus - no other components we use require GDIplus - we just need to get the TChart working again using GDI properly.

Thank you.

Peter Pokorny
Wave Systems (Australia)
http://wavesystems.com.au

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Jul-2014, at 5:17 AM EST
From: Peter Pokorny
 
Re: TChart XE6 issue with freeing library containing TChart.  
News Group: embarcadero.public.delphi.reporting-charting
Hi Peter,

> {quote:title=Peter Pokorny wrote:}{quote}
> Thank you for your suggestion. We have tried it, but it did not work. If we change the Rendering Options from GDI+ to GDI, the application still hangs. We believe this is because the unit "VclTee.TeeGDIPlus" is still included in the uses clause, and as soon as you have the "VclTee.TeeGDIPlus" included (even if you have removed the actual component from your form), the application fails / hangs on FreeLibrary. And the problem is that even if you remove the "VclTee.TeeGDIPlus" unit from the uses clause, t
he compiler adds it automatically - even if the Chart component is set to use only GDI render - not GDI+.
> 
> Is there anything else we can do? We can't be rewriting our system to use GDIplus - no other components we use require GDIplus - we just need to get the TChart working again using GDI properly.

This works fine for me with your application:
- Open ProjectGroup1.
- Open the design view of the Unit2, where the TChart is.
- Double Click on the chart to open the design time editor.
- Go to the "Chart\3D\Render" tab and select GDI in the list.
- Close the editor and go to the code view of Unit2.
- Remove TeeGDIPlus unit from the uses clause and rebuild it.

So, if the Chart Render isn't GDIPlus, the unit TeeGDIPlus isn't added automatically at the compilation, and the example works fine.

--
Best Regards

Yeray Alonso
Steema Support Central
Follow us in [url=http://twitter.com/SteemaSoftware]Twitter[/url] and [url=https://www.facebook.com/SteemaSoftware]Facebook[/url]

"Important note: If you are a TeeChart registered customer,
please post your support questions at Steema's Support
monitored Forums for a prompter reply."
http://support.steema.com

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Jul-2014, at 5:55 AM EST
From: Yeray Alonso