Thanks for looking at this, Bret.
I tried running the script you included on my machine, it hangs at
around 33 windows, but doesn't crash. Here is the stack trace from the
interrupt, for what it's worth:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p
rocess.rb:44:in `window': Interrupt
from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p
rocess.rb:43:in `each'
from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p
rocess.rb:43:in `window'
from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p
rocess.rb:67:in `new_process'
from C:/test/Watir/modeln/bret.rb:8
from C:/test/Watir/modeln/bret.rb:6:in `times'
from C:/test/Watir/modeln/bret.rb:6
I also need to explicitly include
require 'watir/contrib/ie-new-process'
in order to get the script to run, but I expect that will change in the
next gem release.
As far as threading, here is what I've been doing:
stack = []
threads = []
num_threads.times do |i|
stack.push Thread.new {threads[i] = test.repeat(num_runs) }
sleep 4
end
stack.each {|thread| thread.join}
-Michael
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Wednesday, May 23, 2007 8:21 PM
To: [email protected]
Subject: Re: [Wtr-general] Seg-faults with >4 ie windows (hello)
Michael Sofaer wrote:
> Thanks, Chris
>
> I don't think that it's the machine running out of memory, 8 windows
is
> taking about 150 MB of the 270 MB I have available before I get the
seg
> fault. Closing additional expensive processes doesn't improve the
number
> of windows I can run. Could I be running into a memory limit inside
Ruby
> or Watir?
>
> Thanks for the recommendation for Grinder, I will look into that,
> although the app is pretty back-end intensive per user, so I hope to
be
> OK for a bit with Watir.
>
>
Michael,
Thank you for your report. I'm am sorry to hear of the problems you
reported. The following script repeatedly failed for me after 30 windows
were opened, although i was not able to reproduce the SIGSEGV that you
reported. In my case, I got errors telling me that Internet Explorer
itself had failed.
Bret
require 'watir'
@ie = []
50.times do | n |
puts n; $stdout.flush
@ie << Watir::IE.new_process
end
@ie.each {|ie| ie.close}
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general