cornernote Posted July 27, 2009 Share Posted July 27, 2009 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 Link to comment Share on other sites More sharing options...
99ojo Posted July 27, 2009 Share Posted July 27, 2009 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.-- cornernoteHi,you may should increase ´the size of your pagefile:see http://groups.google.com/group/microsoft.public.win32.programmer.gdi/browse_frm/thread/59a5dd42aaa5bb7cor global google searchhttp://www.google.de/search?hl=de&q=CreateCompatibleBitmap%3A+not+enough+storage+is+available+to+process+the+command&meta=;-))Stefan Link to comment Share on other sites More sharing options...
Authenticity Posted July 27, 2009 Share Posted July 27, 2009 Can you post the relevant code? Check if you didn't forget to release an object once it's not needed. Link to comment Share on other sites More sharing options...
cornernote Posted July 27, 2009 Author Share Posted July 27, 2009 Thank you for the replies.@99ojoMy 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.@AuthenticityIts 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=66545I 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 EndFuncIt doesnt happen every time, only after a few hours of running. Link to comment Share on other sites More sharing options...
Authenticity Posted July 27, 2009 Share Posted July 27, 2009 I'm not 100% sure but this can be the problem. Change the GetImage() function at the end from: _GDIPlus_ImageDispose ($pBitmap) _WinAPI_DeleteObject ($pBitmap) to: _GDIPlus_ImageDispose ($pBitmap) _WinAPI_DeleteObject ($hbScreen) Link to comment Share on other sites More sharing options...
Yashied Posted July 27, 2009 Share Posted July 27, 2009 http://www.autoitscript.com/forum/index.php?showtopic=97843 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
cornernote Posted July 27, 2009 Author Share Posted July 27, 2009 @AuthenticityI 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.@YashiedI 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 >_< Link to comment Share on other sites More sharing options...
Yashied Posted July 27, 2009 Share Posted July 27, 2009 @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. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
cornernote Posted July 27, 2009 Author Share Posted July 27, 2009 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. Link to comment Share on other sites More sharing options...
cornernote Posted July 28, 2009 Author Share Posted July 28, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now