Re: The window does not have scroll bars..
- From: Hans Heintz <NOSPAMhh_000001@xxxxxxxxx>
- Date: Mon, 24 Oct 2005 20:19:47 +0200
I've seem to have solved my problem in this completely lame way:
Just making a wrap around function for createform in which creating the form is tried until it
succeeds (with a max of 20). Unsucessfull attempts are still logged for me to see but the customer
is spared this silly error.
The problems still shows up once a day, everytime the second attempt is succesfull at once and no
residue problems seem to be present..
procedure HCreateform(Formclass : TFormClass; var reference);
var
succes : boolean;
i : integer;
begin
i := 0;
succes := false;
while not succes do begin
inc(i);
try
application.createform(Formclass,reference);
succes := true;
except
on e:exception do handlederror('fout creëeren form ' + inttostr(i),e,false);
end;
if not succes then freeandnil(tobject(reference));
if i > 20 then begin
foutbox('fout venstercreatie, sluit en herstart Veterin');
break;
end;
end;
end;
On Wed, 19 Oct 2005 20:54:25 +0200, Hans Heintz <NOSPAMhh_000001@xxxxxxxxx> wrote:
>D4/win-xp-pro
>
>Since a month or so the workplace that beta-tests my program almost once every day experiences an
>error
>
>'The window does not have scroll bars..'
>.
>
>It occurs at every workstation and with creation of all different forms. It seems completely random.
>The comlete error message is listed below.
>The error might suggest a resource problem or handle problem. First i thought these type of errors
>should be rare in winxppro. Second running my program through memproof doesn't suggest leakage of
>any pointer. Third I am very careful to freeandnil anything i create.
>
>Also I 'd like to know how I could measure resource usage in windows-xp.
>
>I've browsed newsgroup histories for this problem but found nothing usefull.
>Since all forms seems to be able to get affected it must be some kind of general problem, but what?
>Can you have too many components on your forms? Can your program be too big?
>How can I find a solution to this?
>
>
>========================================================================
>The message:
>The last line being the line in my code where a form is created - varies depending on the form.
>
>
>exception class : EOutOfResources
>exception message : The window does not have scroll bars..
>
>main thread ($374):
>00442d8c pveterin.exe Graphics 2524 GDIError
>00463920 pveterin.exe Controls 5397 TWinControl.CreateHandle
>004671dc pveterin.exe Controls 7039 TWinControl.HandleNeeded
>004671f4 pveterin.exe Controls 7045 TWinControl.GetHandle
>00466f52 pveterin.exe Controls 6938 TWinControl.GetDeviceContext
>0045da87 pveterin.exe Controls 2697 TControlCanvas.CreateHandle
>00442933 pveterin.exe Graphics 2351 TCanvas.RequiredState
>004424d8 pveterin.exe Graphics 2213 TCanvas.TextExtent
>00442555 pveterin.exe Graphics 2226 TCanvas.TextHeight
>0047aeba pveterin.exe Forms 2616 TCustomForm.GetTextHeight
>0047abf1 pveterin.exe Forms 2558 TCustomForm.ReadState
>004358b9 pveterin.exe Classes 1717 TList.Add
>0043b649 pveterin.exe Classes 4756 TReader.ReadRootComponent
>00438d23 pveterin.exe Classes 3384 TStream.ReadComponent
>0043543e pveterin.exe Classes 1487 InternalReadComponentRes
>00435624 pveterin.exe Classes 1532 InitComponent
>00435694 pveterin.exe Classes 1541 InitInheritedComponent
>0047a4af pveterin.exe Forms 2401 TCustomForm.Create
>0048312c pveterin.exe Forms 6487 TApplication.CreateForm
>00591942 pveterin.exe UBehandelForm 670 TBehandelForm.Verwerkregels
.
- References:
- The window does not have scroll bars..
- From: Hans Heintz
- The window does not have scroll bars..
- Prev by Date: Re: OT - Obfuscation challenge (a little fun if you're bored)
- Next by Date: Version after Version
- Previous by thread: The window does not have scroll bars..
- Next by thread: Thread problem
- Index(es):
Relevant Pages
|