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 317

Summary: [TV52015580] For some reason, TeeCreateBitmap and Refresh can't be called together...
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: Other ComponentsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WORKSFORME    
Severity: major CC: david
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2013-11-20 10:38:08 EST
For some reason, TeeCreateBitmap and Refresh can't be called together.
Deppending on the machine, the following code ends soon or late with an EOutOfResources exception.
uses Chart;
var tc: TChart;
procedure TForm1.FormCreate(Sender: TObject);
begin
  tc:=TChart.Create(Self);
  tc.Parent:=Form1;
end;
procedure TForm1.Button1Click(Sender: TObject);
var tbm: TBitmap;
    i: Integer;
begin
  i:=0;
  while True do
  begin
    Inc(i);
    Caption:=IntToStr(i);
    tbm:=tc.TeeCreateBitmap(tc.BackColor,Rect(0,0,1024,1024));
    tbm.Free;
    tc.Refresh;
  end;
end;
In TeeProcs.pas, method TCustomTeePanel.NonBufferDraw, if I comment the following line, the exception appears later.
TTeeCanvas3DAccess(InternalCanvas).IKeepBitmap:=False; [created:2011-05-19T13:26:34.000+01:00 reported by:yeray@steema.com reported in version:2011.03.30407 (TeeChart VCL)]
Comment 1 david berneda 2013-12-04 05:18:23 EST
Cannot reproduce. The problem should be fixed with latest code.

Tested with both GDI and GDI+, using FastMM with define "FullDebugMode".
Memory, handles and GDI user objects are stable, they dont grow up to a crash.

Tests done up to 10000 bitmap creations.