| View previous topic :: View next topic |
| Author |
Message |
HiddenKnowledge
Joined: 30 Sep 2009 Posts: 5
|
Posted: Wed Nov 25, 2009 10:00 pm Post subject: Problems with downloading big files |
|
|
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 |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Thu Nov 26, 2009 1:43 am Post subject: |
|
|
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 |
|
 |
rtcvb32
Joined: 17 Feb 2008 Posts: 289
|
Posted: Thu Nov 26, 2009 4:49 am Post subject: |
|
|
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 |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Thu Nov 26, 2009 6:28 am Post subject: |
|
|
| 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? (I didn't look into the used API's for what they really need) |
|
| Back to top |
|
 |
|