AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with downloading big files

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
HiddenKnowledge



Joined: 30 Sep 2009
Posts: 5

PostPosted: Wed Nov 25, 2009 10:00 pm    Post subject: Problems with downloading big files Reply with quote

I am having some problems with this project.
Especially with this file. Because when i download a big file then it gives an error. I temporary fixes it by adding a if but that is not how i want it. Because i just want it to work. I hope i gave enough info.
Kind Regards,
ImageSave

Pictures of the error:

Back to top
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Nov 26, 2009 1:43 am    Post subject: Reply with quote

There is propobably another VarSetCapacity needed, as mentioned in the second error.
Maybe the script uses a variable that should be set with VarSetCapacity, and that variable reaches now its limit with #MaxMem.
Back to top
View user's profile Send private message
rtcvb32



Joined: 17 Feb 2008
Posts: 289

PostPosted: Thu Nov 26, 2009 4:49 am    Post subject: Reply with quote

Default max size is 64Mb. If you are getting larger than that, then change your #MaxMem accordingly. Might change it to 256Mb, but hope it doesn't have many variables that big as you will quickly eat up your memory.

Code:

sizeArray := SubStr(sizeArray,1,-1)

;should pop up a tooltip with your memory size, if allocation succeeds it will go away very quickly.

tmp_memsize := fsize + 1 / (1024*1024)
    tooltip Memory requested %tmp_memsize%Mb in size

varSetCapacity(result, fSize+1,0)
tooltip
Back to top
View user's profile Send private message Yahoo Messenger
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Nov 26, 2009 6:28 am    Post subject: Reply with quote

rtcvb32 wrote:
Default max size is 64Mb.
But keep in mind that AHK Help mentions:
Quote:
This setting restricts only the automatic expansion that a variable does on its own. It does not affect VarSetCapacity.
I could be wrong, but a VarSetCapacity could maybe solve both errors? Confused (I didn't look into the used API's for what they really need)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group