neilontherock Posted August 26, 2010 Share Posted August 26, 2010 Hi, I have been using the InetGetSource function in my script for about 6 months with no issues. About 2 weeks ago the script started failing and I have traced the problem to the InetGetSource function. This is the last function called before my script aborts. I tried adding a error handler using a while/wend and @error but it does not get triggered. My question is; is there a way to trap an error in the InetGetSource function? I would like my script to continue processing when this function fails. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
JohnOne Posted August 26, 2010 Share Posted August 26, 2010 I am using @error. The function does not return and causes the script to abort. The function works fine heredo you have an example?have you tried the function on its own outside of your script? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
neilontherock Posted August 26, 2010 Author Share Posted August 26, 2010 The function works fine heredo you have an example?have you tried the function on its own outside of your script?Yes most of the time the function works fine. I am downloading approx. 3000 files and it seems to crash after about 1 hour of running with no problems.I suspect that the InetRead is actually crashing but can't be sure because it doesn't return an error, it just crashes and the script aborts. Link to comment Share on other sites More sharing options...
Realm Posted August 26, 2010 Share Posted August 26, 2010 Lets think about this!I have been using the InetGetSource function in my script for about 6 months with no issues.So you know you wrote a working script.About 2 weeks ago the script started failing and I have traced the problem to the InetGetSource functionMy best guess is that the server you downloaded from, made some changes. Maybe added a download limit. What I would do is add some counters, and see if it stops at a bit count or file count. If you find that the server blocks after a given count, you could write your script to close inet, and reopen before those limits are met. My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
neilontherock Posted August 26, 2010 Author Share Posted August 26, 2010 (edited) Lets think about this!So you know you wrote a working script.My best guess is that the server you downloaded from, made some changes. Maybe added a download limit. What I would do is add some counters, and see if it stops at a bit count or file count. If you find that the server blocks after a given count, you could write your script to close inet, and reopen before those limits are met.Thanks. That is what I suspect as well but the only thing is I cannot close inet because the _INetGetSource does not give me a handle. I assumed that the _INetGetSource function which implements the InetRead function would be performing the close each time. Edited August 26, 2010 by neilontherock Link to comment Share on other sites More sharing options...
neilontherock Posted August 26, 2010 Author Share Posted August 26, 2010 Thanks. That is what I suspect as well but the only thing is I cannot close inet because the _INetGetSource does not give me a handle. I assumed that the _INetGetSource function which implements the InetRead function would be performing the close each time.I think I may know what's wrong. I just took a look at the memory being consumed by my script and it was up to 1g before it failed. I have been keeping track of the size of each file and the total is about 1g. Looks like I may be hitting a memory limit. Do I need to make another function call to release the string from memory after calling _INetGetSource? 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