Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TChart XE6 issue with freeing library containing TChart.(FreeLibrary fails)



Permlink Replies: 3 - Last Post: Jul 3, 2014 2:55 AM Last Post By: Yeray Alonso
Lukasz Rewak

Posts: 15
Registered: 6/10/04
TChart XE6 issue with freeing library containing TChart.(FreeLibrary fails)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 2, 2014 12:08 AM
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
Yeray Alonso

Posts: 75
Registered: 6/12/11
Re: TChart XE6 issue with freeing library containing TChart.(FreeLibrary fails)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2014 1:31 AM   in response to: Lukasz Rewak in response to: Lukasz Rewak
Hello Lukasz,

Lukasz Rewak wrote:
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.

Lukasz Rewak wrote:
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.

Lukasz Rewak wrote:
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 Twitter and Facebook

"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
Peter Pokorny

Posts: 1
Registered: 2/17/02
Re: TChart XE6 issue with freeing library containing TChart.(FreeLibrary fails)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2014 2:17 AM   in response to: Yeray Alonso in response to: Yeray Alonso
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
Yeray Alonso

Posts: 75
Registered: 6/12/11
Re: TChart XE6 issue with freeing library containing TChart.(FreeLibrary fails)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2014 2:54 AM   in response to: Peter Pokorny in response to: Peter Pokorny
Hi Peter,

Peter Pokorny wrote:
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.

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 Twitter and Facebook

"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
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02