Project

General

Profile

Bug #5771

WIN32OLERuntimeError using 1.9.2

Added by yohei (Yohei Kaneko) about 9 years ago. Updated 1 day ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.9.2p290, 1.9.3-p0
Backport:
[ruby-core:<unknown>]

Description

I found a problem using win32ole library in threaded script. Ruby version I used is 1.9.2p290. It is said that same happens on 1.9.3-p0. Following is the minimal example that exposes this problem and the problem happens at ie.document. Doing sleep for few seconds between ie.navigate and ie.document works.

require 'win32ole'
t = Thread.new do
begin
ie = WIN32OLE.new( "InternetExplorer.Application" )
ie.visible = true
ie.navigate("http://google.com")
ie.document
puts "OK"
rescue Exception => e
puts e.class
puts e
puts e.backtrace
end
end
t.join

The output is:
WIN32OLERuntimeError
document
OLE error code:80004005 in

HRESULT error code:0x80020009

A little similar to ruby bug #2618, but this time problem happens after accessing document after navigate.

#1

Updated by ko1 (Koichi Sasada) almost 9 years ago

  • Assignee set to suke (Masaki Suketa)
#2

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Status changed from Open to Assigned

Updated by jeremyevans0 (Jeremy Evans) 1 day ago

  • Status changed from Assigned to Closed

I tried the example code in Ruby 2.6, Ruby 2.7, and Ruby 3.0. on Windows 10, and got the expected output each time (Internet Explorer opened), OK output on console. If you think this is still an issue with a supported version of Ruby and Windows, please reopen.

Also available in: Atom PDF