Sign in to follow this  
Followers 0
cornernote

_WinAPI_CreateCompatibleBitmap - ERROR

10 posts in this topic

Hello,

I am getting this error:

_WinAPI_CreateCompatibleBitmap: not enough storage is available to process the command.

I believe it is something to do with capturing the screen, but im really stuck on this one and i cannot seem to find anyone else with the same problem in the forums.

Any help, ideas or suggestions anyone can come up with would be most appriciated.

Even if someone can suggest a way that I can debug this to capture useful information about what may be causing it would be great.

I seem to have plenty of RAM and Disk space available and I am keen to try anything to debug and resolve this.

-- cornernote

Share this post


Link to post
Share on other sites



Hello,

I am getting this error:

_WinAPI_CreateCompatibleBitmap: not enough storage is available to process the command.

I believe it is something to do with capturing the screen, but im really stuck on this one and i cannot seem to find anyone else with the same problem in the forums.

Any help, ideas or suggestions anyone can come up with would be most appriciated.

Even if someone can suggest a way that I can debug this to capture useful information about what may be causing it would be great.

I seem to have plenty of RAM and Disk space available and I am keen to try anything to debug and resolve this.

-- cornernote

Hi,

you may should increase ´the size of your pagefile:

see http://groups.google.com/group/microsoft.public.win32.programmer.gdi/browse_frm/thread/59a5dd42aaa5bb7c

or global google search

http://www.google.de/search?hl=de&q=CreateCompatibleBitmap%3A+not+enough+storage+is+available+to+process+the+command&meta=

;-))

Stefan

Share this post


Link to post
Share on other sites

Can you post the relevant code? Check if you didn't forget to release an object once it's not needed.

Share this post


Link to post
Share on other sites

Thank you for the replies.

@99ojo

My page size is set to be automatically assigned by windows. Do you think if i set it to something huge it will fix it? I will try with 2gb swap file (512mb real RAM in the VM) and see how it goes.

@Authenticity

Its part of a bigger application and I am having trouble pinpointing the relevant code. The entire project is here:

http://code.google.com/p/zynga-poker-bot/

If there is something that I can put in the code to capture the error then I am more than happy to add it in.

The problem started last night when I added Find BMP in another BMP:

http://www.autoitscript.com/forum/index.php?showtopic=66545

I am using it like this:

#include "vendor/FindBMP/FindBMP.au3"
#include "vendor/FileListToArray/FileListToArray.au3"
Global $sDataPath = '../data'
Func _PopupClose()
    Local $aFiles = _FileListToArrayEx($sDataPath & "\bmp\", "popup_*.bmp")
    For $i = 1 To $aFiles[0]
        $aResult = _FindBMP("SCREEN",$aFiles[$i])
        If $aResult[1]==True Then
            MouseClick('left',$aResult[3],$aResult[4],1,10)
            Return True
        EndIf
    Next
EndFunc

It doesnt happen every time, only after a few hours of running.

Share this post


Link to post
Share on other sites

@Authenticity

I am just installing my VMs onto a new workstation so I will test asap, or get one of my other bot users to test it and I will post the results.

@Yashied

I saw that post last night and I changed my screen capture function to include the change:

_WinAPI_DeleteObject($aIcon[4]); <- THIS!
            _WinAPI_DeleteObject($aIcon[5]); <- THIS!

didnt seem to help >_<

Share this post


Link to post
Share on other sites

@Authenticity

I am just installing my VMs onto a new workstation so I will test asap, or get one of my other bot users to test it and I will post the results.

@Yashied

I saw that post last night and I changed my screen capture function to include the change:

_WinAPI_DeleteObject($aIcon[4]); <- THIS!
            _WinAPI_DeleteObject($aIcon[5]); <- THIS!

didnt seem to help >_<

You have a memory leak occurs. This is 100%. But where, it can be said only after we look at your code.

Share this post


Link to post
Share on other sites

Yes, i have no doubt this is true. Im a PHP programmer trying to make a bot in autoit. This is my first real project in autoit and there isnt really any community members using my bot that have experience in autoit.

Hopefully more people will come and join the community that have autoit skills to help clean up my mess a little. >_<

I have tried to keep all the code clean, separated, well named and easy to read. However the bottom line is that my understanding of autoit is still very fresh.

How would you recommend finding memory leaks? I know its probably a straight forward question with an answer that is far from straight forward, but even a push in the right direction would be great.

And if anyone from these forums wants to get involved in my open source facebook poker bot then I welcome everyone and encourage both novices and gurus to contribute with ideas, code, bug reports and general community gossip. =)

Myself and some other community members are running with Authenticity's suggestion and so far so good, but sometimes it takes a while to get the error.

Thanks guys for helping me out, it is really appreciated.

Share this post


Link to post
Share on other sites

still got the error when i ran overnight.

>_<

Im not sure if it is less frequent because of the change, or just due to randomness but it does seem to happen less at the moment.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0