Hi,
When I close my application I have got a crash into Winapi.GDIOBJ.Finalization. I don't know why.
I have to precise than the form containing the graph is in a separated dll and I also link my application with the option "Link with runtime packages".
You can find an sample delphi 10.1 project to illustrated this in attachement.
I'm working with Steema TeeChart Pro VCL FMX 2016.19
Crash into Winapi.GDIOBJ.Finalization
-
- Newbie
- Posts: 4
- Joined: Wed Apr 27, 2016 12:00 am
Crash into Winapi.GDIOBJ.Finalization
- Attachments
-
- TeeChart_GDIPlus_exe_and_dll.zip
- (151.66 KiB) Downloaded 483 times
Re: Crash into Winapi.GDIOBJ.Finalization
Hello,
Your application doesn't crash for me using TeeChart Pro v2016.19 and RAD 10.1 Berlin Update 2 in a Windows 10 x64 machine.
Should I do anything special with it?
Your application doesn't crash for me using TeeChart Pro v2016.19 and RAD 10.1 Berlin Update 2 in a Windows 10 x64 machine.
Should I do anything special with it?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 4
- Joined: Wed Apr 27, 2016 12:00 am
Re: Crash into Winapi.GDIOBJ.Finalization
Sorry I send you a bad project version.
Here is the good one.
Best regards,
Here is the good one.
Best regards,
- Attachments
-
- TeeChart_GDIPlus_exe_and_dll.zip
- (156.86 KiB) Downloaded 479 times
-
- Newbie
- Posts: 4
- Joined: Wed Apr 27, 2016 12:00 am
Re: Crash into Winapi.GDIOBJ.Finalization
When I change the charts renderer from GDI+ to GDI, the crash disappears.
What is the reason of that ?
What is the reason of that ?
Re: Crash into Winapi.GDIOBJ.Finalization
Hello,
Take a look at this related thread and this article.
A couple of notes after investigating your example:
- DclTee924 is a design time package and shouldn't be in the "runtime packages" list.
- Even if both projects (exe and dll) have "runtime packages" with the same package (ie Tee924), this doesn't seem to work fine. The referenced package isn't listed under "Project->Information for Chart_EXE".
This can be solved adding "VCLTee.Chart" in the uses clause of the Unit_EXE.pas.
- Finalization in WinAPI.GDIPObj.pas is called twice (one for the library and one for the exe). The second time causes the error because it is already shut down.
We've observed that, if you comment the GdiplusShutdown call, the error stops appearing.
Take a look at this related thread and this article.
A couple of notes after investigating your example:
- DclTee924 is a design time package and shouldn't be in the "runtime packages" list.
- Even if both projects (exe and dll) have "runtime packages" with the same package (ie Tee924), this doesn't seem to work fine. The referenced package isn't listed under "Project->Information for Chart_EXE".
This can be solved adding "VCLTee.Chart" in the uses clause of the Unit_EXE.pas.
- Finalization in WinAPI.GDIPObj.pas is called twice (one for the library and one for the exe). The second time causes the error because it is already shut down.
We've observed that, if you comment the GdiplusShutdown call, the error stops appearing.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 4
- Joined: Wed Apr 27, 2016 12:00 am
Re: Crash into Winapi.GDIOBJ.Finalization
Hello,
Thanks for your answer.
Just a few questions. Which are the packages I have to reference in the runtime packages?
Why did you say that Finalization in WinAPI.GDIPObj.pas is called twice (one for the library and one for the exe)?
I see it only once in the exe.
Thanks for your answer.
Just a few questions. Which are the packages I have to reference in the runtime packages?
Why did you say that Finalization in WinAPI.GDIPObj.pas is called twice (one for the library and one for the exe)?
I see it only once in the exe.
Re: Crash into Winapi.GDIOBJ.Finalization
Hello,
http://stackoverflow.com/questions/2303 ... e-packages
I've moved the Chart_EXE.exe and the Chart_DLL.dll to a clean Windows 10 virtual machine. Executing the exe fails with missing rtl240.bpl, then Tee924.bpl,... Finally, the minimum files I had to distribute were:
Chart_DLL.dll
Chart_EXE.exe
rtl240.bpl
Tee924.bpl
vcl240.bpl
vclimg240.bpl
Take a look at this explanation:AROTechnologies wrote: Which are the packages I have to reference in the runtime packages?
http://stackoverflow.com/questions/2303 ... e-packages
I've moved the Chart_EXE.exe and the Chart_DLL.dll to a clean Windows 10 virtual machine. Executing the exe fails with missing rtl240.bpl, then Tee924.bpl,... Finally, the minimum files I had to distribute were:
Chart_DLL.dll
Chart_EXE.exe
rtl240.bpl
Tee924.bpl
vcl240.bpl
vclimg240.bpl
We saw it debugging, placing a breakpoint at the Finalization part in WinAPI.GDIPObj.pas. The first time passing IsLibrary=True, the second time IsLibrary=False and it crashes because it has been already shut down.AROTechnologies wrote:Why did you say that Finalization in WinAPI.GDIPObj.pas is called twice (one for the library and one for the exe)?
I see it only once in the exe.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |