TC 7.5 b4: Out of system resources

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

TC 7.5 b4: Out of system resources

Post by *roentgen »

Code: Select all

---------------------------
Total Commander
---------------------------
Out of system resources.
Please report this error to the Author,
with a description of what you were doing when this error occurred!
Continue execution?

Delphi exception: EOutOfResources

Stack trace:

761598F6  00413DE4  76066242  7606695B

7606690A  76070795  003C0CDE  760707BB

00442AB1  00413DE4  76066242  760672BD

7606690A  76066A17  76067358  776E00E4

776E00E4  7607387D  760738D3  7607B130

760681C0  0041942D  00419458  00453E79

0042FE38  004A0473  77702F18  77702F4E

7549ABC1  7549AF22  7549AF59  006917C5

004A1942  00500007  77702F3C  77702F18

00560008  77702F18  77702F18  77702F4E

76161FF5  7616210C  770A445F  770C03C8

004780BC  77702F18  77702F3C  77702F18

776FDFEC  76161FF5  7616210C  
Press Ctrl+C to copy this report!
---------------------------
Yes   No   
---------------------------
Windows 7 x64
I just resumed from hibernation, but the computer definetely wasn't out of system resources (physical memory 38%).

TC was freshly started, I started some programs from it and just before the error I pressed Ctrl+F. I chose to continue and everything seems fine.
TC for Linux please!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Delphi creates this exception if it fails to allocate memory or window handles. I will check where exactly it failed, but I doubt that I can do much about it.
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2roentgen
I have checked your stack trace now. The error occurs when TC tries to load the master password dialog. I have then put a breakpoint on all code lines where an "out of system resources" error could be created. The only code which could cause the error and which is called when opening the master password dialog is when loading the image of a (normally hidden) button in this dialog.

So my interpretation from the two linked bug reports is true here too: For some reason, Total Commander could not read from its EXE file totalcmd.exe. This usually occurs when TC is installed on a network drive which is currently unreachable. Windows may have disconnected the drive when you started hibernation.
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Not in my case. It's on a local HDD.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

I have it on local HDD too but encrypted and that might induce some "lag".
TC for Linux please!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, here is the code from Delphi where the out of resources error is created:

Code: Select all

          DC := GetDC(Focus);
          if DC = 0 then OutOfResources;

...

              Bits := CreateDIBitmap(DC, BitmapInfo^.bmiHeader,  CBM_INIT, BitsMem,
                BitmapInfo^, DIB_RGB_COLORS);
              if Bits = 0 then OutOfResources;
The first one is when Delphi tries to get a so-called "device context", which is used to draw on the screen or to handle windows graphics objects. This should never fail, except when the system really is out of resources.

The second one creates a device independent bitmap. This can fail in two cases: Also when the system is out of resources, or when the bitmap data is invalid (e.g. wrong image dimensions or so).

In beta 5, I will catch this second exception and try create a 1x1 pixel bitmap. If this fails too, we are really out of system resources. If it doesn't fail, TC will show empty bitmaps in some places, but not show any error. I hope that this will fix the observed error...
Author of Total Commander
https://www.ghisler.com
Post Reply