Page 1 of 1

TRealTimeMarquee generates EOutOfResources exception...

PostPosted: December 20th, 2009, 1:11 am
by actalk
Hello,

I use Vista.

To reproduce error:

need a TRealTimeMarquee object and two buttons on a form.
realTimeMaruqee has an item style text.
Active: True
Font name: Arial
Font Size: 72

I try to scale the form via code below.

button1OnClick
Code: Select all
  scaleby(99, 100);


button2OnClick
Code: Select all
  scaleby(101, 100);


When I try to scale the form a few times repeatedly,
or application runs over about one hour:

at runtime ..."Project1.exe has stopped working" error occurs.
at debug session..."Project Project1.exe raised exception class EOutOfResources with message 'The parameter is incorrect.'" exception occurs.

I examined TMarqueeItem.PrepareText method but I can not see any obvious problem.

thanks.

Re: TRealTimeMarquee generates EOutOfResources exception...

PostPosted: January 1st, 2010, 2:56 am
by actalk
Hello,

I changed the bitmap pixelformat.
My program starts to run at morning and runs until night.

I dont know if this will be problem for whole day running program .

Code: Select all
constructor TMarqueeItem.Create(Collection: TCollection);
begin
  inherited Create(Collection);
  fBitmap := TBitmap.Create;
  fBitmap.PixelFormat := pf24bit; //This line added to try to solve EOutofResources exception.
end;


Any idea ...thanks.

Re: TRealTimeMarquee generates EOutOfResources exception...

PostPosted: January 1st, 2010, 9:55 pm
by Kambiz
Interesting, it can be a Delphi bug.

Thank you!