Hi Guys,
I noticed a bug several times during the last days work:
If I want to get the size of a file (GetFileSize) with a label, which is called with the SetTimer-Command, I works the first two times but afterwards the Size isn't recognized anymore.
This happens with nearly every Progressbar which should show your Download for example. It stucks at 15% (depending on the file). Sometimes it only shows the progress until 7% or 13% (so it isn't always the same point), then the script crashes.
The file gets downloaded anyway and the progressbar shows 100% suddenly.
The strange thing: If I
right-click the file OR
refresh the folder, the file gets loaded into (context menu>refresh), the progressbar notices that and shows the
correct percentage (afterwards it crashes again).
It doesn't need to be a progressbar, any display-technique collapses.
If I take a relatively high SetTimer-time (5000ms for example), the script works a bit longer (it shows three or four times the correct filesize); crashes later.
I wrote an
little example which crashes, if I wanna use it:
Code:
#Persistent
Gui, Add, Edit, vEdit w300 h300
Gui, Show, w300 h300 center, GetFileSize-bug
SetTimer, Checkfilesize, 500
UrlDownloadToFile, http://91.121.68.38/~web2/xhaozaoj/Umani_1080p_x264.avi, %A_Desktop%/Umani.avi
Checkfilesize:
FileGetSize, filesize, %A_Desktop%/Umani.avi, K
If Errorlevel != 0
msgbox, 0, Error, Can't get the Filesize ;this isn't shown by the script :(
Guicontrol, Text, Edit, %filesize%
return
So the problem is the GetFileSize-Command and not the SetTimer-Command, I think. It's a Vista-bug actually. I tried some workarounds, like refreshing the folder during that getfilesize-sequence etc., but I didn't make it (maybe u know some help).
Will there be a bugfix or anything?
Thanks,
ease
PS: I hope this bug isn't known yet; I searched the forum well.
edit: I missed my system-status:
I got all windows updates, for sure! I got a quad-core PC, so it shouldn't be any kind of overload.