From: William Pinelo Marin Date: 2004-01-13T19:03:18+09:00 Subject: Re: Ruby.exe crashing with WIN32OLE WMI example? ------=_NextPart_000_0114_01C3D517.29A9BDE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Class WMI COM without class register try with next command lines: C:\> C:\>cd c:\winnt\system32\wbem C:\WINNT\system32\wbem> C:\WINNT\system32\wbem> for %a in (*.dll) do regsvr32 %a --.Pinelo. "MikkelFJ" wrote in = message news:3ffb0da3$0$30089$edfadb0f@dtext01.news.tele.dk... >=20 > "yonatan" skrev i en meddelelse > news:37fcf3c0.0401060555.7ab8a404@posting.google.com... > > Regarding Botp's configuration using Windows XP... >=20 > > > > I'm trying to do some WMI stuff with Ruby. I found this > > > > simple example somewhere. It works -- until the program > > > > exists that is. > > > > Then Windows pops up a "ruby.exe - Application Error" message > > > > box due to inappropriate memory access. >=20 > > ...I just installed Ruby 1.8 on an Windows XP box and the WMI = example > > works fine. I then installed it on another Windows 2000 box and the > > WMI example crashes. Any ideas? >=20 > The fact that it crashes on application exit seems to indicate a = problem > with reference counting where an object is being deleted after it has > already been deleted once. The Ruby GC will collect all live objects = on exit > and this is why the problem shows up here. Only a suggestion of = course. > Why it works on one OS and not on another is difficult answer. > Also it doesn't answer why a reference count error might happen in the = first > place. > Except if there is a bug in either the Ruby impl. or in the WMI COM = objects > implementation. >=20 > Regards >=20 > MikkelFJ >=20 >=20 >=20 > ------=_NextPart_000_0114_01C3D517.29A9BDE0--