From: Jos Backus Date: 2004-05-10T14:19:12+09:00 Subject: Re: Ruby Installer for Windows: use of Win32OLE bug causes crash On Mon, May 10, 2004 at 12:43:53PM +0900, Shashank Date wrote: > > It sure would be nice to hear the win32ole author pipe up. > > At this point it does not seem like a win32ole issue since the following > snippet > works (at least on Win XP and ruby-1.8.1-rc13): > #--------------------------------------------- > require 'win32ole' > > host = "localhost" > wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2") > disks = wmi.ExecQuery("Select * from Win32_LogicalDisk") > p disks > > disks.each do |disk| > next if disk.Size.nil? > p disk.DeviceID, disk.Size, disk.FreeSpace > end > #--------------------------------------------- But it breaks the moment you add any CGI call. Now what is more likely to be the culprit, cgi.rb et al. (all written in Ruby afaIk) or win32ole.so? My money's on a module that interacts heavily with COM/OLE/the Win32 API, not the interpreter. Adding cgi.rb to the program does trigger the problem but I'm confident that the real problem is inside win32ole. Note also that in the most stripped example, among others, removing the require 'fileutils' makes the error go away. That to me smells like a file descriptor/memory issue of some sort. Of course I could be all wrong :) Methinks the win32ole author should be able to track this one down using the failing examples given. That sure would be nice, as the win32ole stuff is incredibly powerful. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'