Modify

Opened 17 years ago

Closed 16 years ago

Last modified 3 years ago

#233 closed Bug (Works For Me)

Inetget + "automatically detect proxy settings" = HUGE RAM usage

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.2.10.0 Severity: None
Keywords: Cc:

Description

Tried this post in the forum but didn't get any reply... so I'm thinking it's a real bug and this is the right place for it. So here you go...

I'm using Winter's WeeWar Notifier (see his post # 53213 in the forums) and I was surprised to see it using 600+ MB of RAM!

I did some testing and it looks like the problem happens when he calls InetGet() and I have my IE proxy settings set to "automatically detect proxy settings". If I uncheck that option and manually code in the proxy config then there is no problem. But as soon as you check that box every call to InetGet() sucks another 30+ MB of RAM away.
The problem doesn't occur if you don't save the download to a file, but then what good is that?

I'm using v 3.2.10.0 of autoit, WinXP SP2, IE 7.

To replicate you have to set up an auto-proxy, but with that this code snippet shows the behavior (look in task manager at autoit3.exe memory usage)

while 1
HttpSetProxy(0)
$testResults = InetGet ("http://www.microsoft.com","d:\output.htm", 1,1) ; <- bad!
;also bad -> InetGet ("http://www.microsoft.com","d:\output.htm", 1,1)
;also bad -> InetGet ("http://www.microsoft.com","d:\output.htm")
;good! but doesn't do anything useful -> InetGet ("http://www.microsoft.com")
$button = MsgBox(1,"","go again?")
if $button == 2 Then ExitLoop
WEnd

So... what gives? Is this a bug in how InetGet() works? Thanks!

Attachments (0)

Change History (10)

comment:1 Changed 17 years ago by sandawg

Hello? Anybody moderating this thing?

comment:2 Changed 17 years ago by Valik

Don't be a pest.

comment:3 Changed 17 years ago by sandawg

Pest? Original post was April 11, bug report April 29. Just a "hmm... hard to replicate, will take a while to test" would have been fine. But nothing until I poked the badger, so to speak.

Anywho, just re-tested with v3.2.12.0 and the same behavior occurs.

comment:4 Changed 17 years ago by Jon

Wasn't able to reproduce on my system. What does "setup an auto proxy" mean?

comment:5 Changed 17 years ago by Jon

  • Resolution set to Works For Me
  • Status changed from new to closed

Unable to repro and no new info.

comment:6 Changed 17 years ago by sandawg

Sorry... I've been out of the office for a while and haven't been able to check back.

One of IE's features is "web proxy auto-discovery" or WPAD. If you check off "automatically detect settings" in your IE connection settings, that tells IE to use WPAD.

For WPAD to work, you need a web server and a proxy server.
Put an entry in your HOSTS file for "wpad" that points at your web server.
On the root of the web server, you put a file called wpad.dat that contains a javascript function that defines your proxy server. Simplest script looks like this:

function FindProxyForURL(url, host)

{

return "PROXY ip.of.proxy.svr:port";

}

So, IE resolves "wpad", gets the wpad.dat file and runs the function to get the proxy server. Set up like that, using InetGet() chews RAM like a caffinated beaver.

comment:7 Changed 17 years ago by sandawg

Wierd... I can't change it back to "reopened". Hopefully somebody looks at it even though it is still closed.

comment:8 Changed 17 years ago by Valik

  • Resolution Works For Me deleted
  • Status changed from closed to reopened

Re-opening to make sure Jon sees this.

comment:9 Changed 17 years ago by sandawg

Thanks, Valik!

comment:10 Changed 16 years ago by Valik

  • Resolution set to Works For Me
  • Status changed from reopened to closed

Alright, I just tested this. I'm fairly sure I have everything working. I used a Linux virtual machine to host the wpad.dat file. When I put a bogus proxy address in the wpad.dat, IE fails to load anything. I grabbed the IP of a proxy server off the internet and stuck that in and IE works. I tested the script you posted in both cases - with a working proxy and without. I saw nothing abnormal. Memory usage stayed constant as did processor usage. When I was using a valid proxy address, the file was downloaded. When I had an invalid address, nothing was downloaded. It all seemed really normal.

So, I'm closing this as works for me.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.