Why EOutOfResources ?

Giganews Newsgroups
Subject:Why EOutOfResources ?
Posted by: Jacob Havkrog
Date:Mon, 30 Nov 2009

Hi -

cany anybody tell me why this error occurs? I've seen it several times, but cannot reproduce it. There seems to be enough free memory...

Thanks
Jacob

the offending bit of code:

procedure TDynamicValueCanvas.SetVisibleSize(AVisibleWidth, AVisibleHeight: Integer);
begin
  FBitmap.Width := Max(FMaxX, AVisibleWidth);
  FBitmap.Height := AVisibleHeight + 50;
end;

I realize that I can use FBitMap.SetSize instead and I'll change it now. But that shouldn't be the problem?
Thanks
Jacob

Below the stack trace (by madshi):

operating system  : Windows XP Service Pack 3 build 2600
system language  : Danish
system up time    : 3 days 21 hours
program up time  : 3 hours 32 minutes
processors        : 2x Intel(R) Pentium(R) 4 CPU 3.00GHz
physical memory  : 53/502 MB (free/total)
free disk space  : (C:) 58,06 GB
display mode      : 1680x1050, 32 bit
allocated memory  : 190,41 MB
compiled with    : Delphi 2006/07
madExcept version : 3.0k
exception number  : 1
exception class  : EOutOfResources
exception message : There is not enough memory available to process this command (translated from Danish by Google / Jacob).

Main ($fd8):
00487f03 DSALon.exe Graphics            2954 GDIError
00487f3b DSALon.exe Graphics            2961 GDICheck
0048b9b3 DSALon.exe Graphics            5467 CopyBitmap
0048c373 DSALon.exe Graphics            5734 TBitmap.CopyImage
0048ddf8 DSALon.exe Graphics            6840 TBitmap.SetSize
0048d6bf DSALon.exe Graphics            6507 TBitmap.SetHeight
006344e1 DSALon.exe DynamicValueCanvas  276 TDynamicValueCanvas.SetVisibleSize
00720a29 DSALon.exe DynFeeReportUnit    739 TDynFeeReportForm.FormResize
004bd3e1 DSALon.exe Controls            3753 TControl.Resize
004c4708 DSALon.exe Controls            7741 TWinControl.WMSize
004d5e38 DSALon.exe Forms              2579 TScrollingWinControl.WMSize
004bf85b DSALon.exe Controls            5146 TControl.WndProc
004c3853 DSALon.exe Controls            7304 TWinControl.WndProc
004d7cdb DSALon.exe Forms              3512 TCustomForm.WndProc
004c2f7c DSALon.exe Controls            7073 TWinControl.MainWndProc
0047dafc DSALon.exe Classes            11583 StdWndProc
7e37f156 USER32.dll                          DefWindowProcA
7e37a993 USER32.dll                          CallWindowProcA
004c394f DSALon.exe Controls            7334 TWinControl.DefaultHandler
004d9dc2 DSALon.exe Forms              4576 TCustomForm.DefaultHandler
004c02d8 DSALon.exe Controls            5409 TControl.WMWindowPosChanged
004c465b DSALon.exe Controls            7720 TWinControl.WMWindowPosChanged
004bf85b DSALon.exe Controls            5146 TControl.WndProc
004c3853 DSALon.exe Controls            7304 TWinControl.WndProc
00499456 DSALon.exe StdCtrls            2999 TCustomCombo.WndProc
0049a6c9 DSALon.exe StdCtrls            3528 TCustomComboBox.WndProc
004c2f7c DSALon.exe Controls            7073 TWinControl.MainWndProc
0047dafc DSALon.exe Classes            11583 StdWndProc
7c90e470 ntdll.dll                          KiUserCallbackDispatcher
006a80f6 DSALon.exe RzForms                  TRzFormState.FormShowHandler
004d7371 DSALon.exe Forms              3211 TCustomForm.DoShow
004db659 DSALon.exe Forms              5425 TCustomForm.CMShowingChanged
004bf85b DSALon.exe Controls            5146 TControl.WndProc
004c3853 DSALon.exe Controls            7304 TWinControl.WndProc
004d7cdb DSALon.exe Forms              3512 TCustomForm.WndProc
004bf4e8 DSALon.exe Controls            5021 TControl.Perform
004c2d1a DSALon.exe Controls            7006 TWinControl.UpdateShowing
004c2e5d DSALon.exe Controls            7041 TWinControl.UpdateControlState
004c5792 DSALon.exe Controls            8397 TWinControl.CMVisibleChanged
004bf85b DSALon.exe Controls            5146 TControl.WndProc
004c3853 DSALon.exe Controls            7304 TWinControl.WndProc
004d7cdb DSALon.exe Forms              3512 TCustomForm.WndProc
004bf4e8 DSALon.exe Controls            5021 TControl.Perform
004be0ca DSALon.exe Controls            4169 TControl.SetVisible
004d7612 DSALon.exe Forms              3316 TCustomForm.SetVisible
004dbee7 DSALon.exe Forms              5753 TCustomForm.Show
004dc11d DSALon.exe Forms              5817 TCustomForm.ShowModal

Replies