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 - [TV52015580] For some reason, TeeCreateBitmap and Refresh can't be called together...
Summary: [TV52015580] For some reason, TeeCreateBitmap and Refresh can't be called tog...
Status: RESOLVED WORKSFORME
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Other Components (show other bugs)
Version: unspecified
Hardware: All All
: Normal major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 14:26 EDT by yeray alonso
Modified: 2013-12-04 05:18 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.