Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 655

Summary: EAssertionFailed - Error transferring internal Bitmap using BitBlt
Product: VCL TeeChart Reporter: roth
Component: CanvasAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: david, sandra
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Call stack EAssertionFailed

Description roth 2014-03-21 08:22:53 EDT
Created attachment 129 [details]
Call stack EAssertionFailed

Hi.

We are receiving EAssertionFailed from our Delphi XE5 application.
The call stack shows that the Assert is in TeCanvas.pas (see attachment).

Could you please tell me what to do and how to fix this?

Thanks and best regards!
Comment 1 david berneda 2014-03-24 13:08:20 EDT
Its difficult to determine the cause of the error because this is one of the "should never happen" cases, and hard to reproduce. 

In the latest version I added the error code to the assertion message (TeCanvas.pas) :

Assert(tmpRes,'Error '+IntToStr(GetLastError)+' transferring internal Bitmap using BitBlt');

It might be related to existing threads (I see CheckSynchronize in the error stack), or maybe a resource limit, or Aero composition.  

One workaround is to disable Chart buffering (just to test, as this makes the chart flicker when repainted):

Chart1.BufferedDisplay := False

Without buffer, the call to BitBlt is never executed.
Comment 2 roth 2014-03-27 11:46:22 EDT
Hi David,

Would it help to know about the error code?
In this case I could adjust the Assertion (like shown in your comment) to get the code.

Please note: A test with BufferedDisplay := False did not bring up the Assertion (like expected). Anyway, we cannot use this, because of the repaint-flicker issue.
Comment 3 david berneda 2014-03-27 13:17:08 EDT
Yes please, GetLastError error code will be great to have, it'll probably be 6 (Invalid Handle).

I've never got an error there, I wrote the assertion "just in case".
Maybe the GPU drivers, or interference with debugger or profiling tools, or its an stress situation (max handles), but I'm not aware of resource leaks.
Are you running inside a virtual machine?

Can you please test against the latest build? Link here:

http://www.teechart.net/files/beta/teechart/vcl/zip/TeeChart2014_140327_SourceCode.zip