Page 1 of 1

Error 6 transferring internal Bitmap using BitBlt

Posted: Tue Jul 14, 2020 12:03 pm
by 16588820
Hello there,

I've run into a problem (Error 6 transferring internal Bitmap using BitBlt) when using TChart within a windows service. I've found sereral threads about this error all related to desktop applications.
The offending line is the same as in those other cases. VCLTee.TeCanvas line 9473 (assert-check).

If I run the same code from a desktop app everything runs just fine. When disabling assertion check before compiling the service, also everything runs fine to the end. Also the output generated looks perfectly fine. So I ask myself, if this BitBlt error is really so harmful.

A solutions on my side would be to disable assertion check altogether. But since I use assert-checks myself for debugging purposes, this is not an option.

Can you think of any possibilities to make it function from within a service without firing the assertion or th remove the assertion altogether in a future release?

For the time being I will just comment the line out to get it work.

If you need a test project, I will put something together. Just let me know.

Environment:
Delphi 10.2 Tokyo
TeeChart 2020.30

Best regards,
Florian

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Fri Jul 17, 2020 11:46 am
by yeray
Hello Florian,

Yes, a simple example always helps to understand&debug the problems and to make sue both parts are in front of the same issue.

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Tue Aug 18, 2020 6:47 pm
by 16583407
Hello,
we had the same problem with Delphi 10.4 and TeeChart 2020.30

willi

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Mon Aug 24, 2020 9:07 am
by yeray
Hello,

Please arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Thu Aug 27, 2020 7:35 am
by 16583407
Hello Yeray
I think it is easy to reproduce.
Use a form with an active TChart, and then start this Form over a remote desktop Connection. Then separate from the remote desktop connection and reconnect. Than the error should happen.

EAssertionFailed: Error 6 transferring internal Bitmap using BitBlt (C:\Program Files (x86)\Steema Software\Steema TeeChart Pro VCL FMX Source Code 2020.30\Source\VCL\VCLTee.TeCanvas.pas, line 9473).

Willi

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Thu Aug 27, 2020 12:06 pm
by yeray
Hello,

We've given a try and the chart shows fine and without errors after closing the connection and reconnecting.
There may be something relevant in the application code to be able to reproduce this problem.

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Wed Sep 02, 2020 7:52 am
by 16588820
Hello everyone,

sorry for my late reply on the request for a test project. I was rather busy during the last view weeks.

I've put tigether a sample project. This consists of a Desktop-applokation where everything works fine an a service application where the assert fires.

The relevant code is in TestThread.pas.

For convenience I added a Sleep-statement to give some time to attach to the service process.

BTW, the service runs fine and produces valid output when "Asserts" are disabled in project options.

Best regards,
Florian

Re: Error 6 transferring internal Bitmap using BitBlt

Posted: Thu Sep 10, 2020 1:20 pm
by yeray
Hello,

I may be doing something wrong because the app seems to work without issues (as expected) any the service doesn't seem to be doing anything. I don't get any error with the service but it doesn't create any Test.wmf & Log.txt either.
I've modified the service to be ran as a console app when in debug mode so we can check what's going on, but then it seems to work without issues.
Test Steema.zip
(53.74 KiB) Downloaded 784 times