Subject:
Re: [ruby-ffi] Re: segfault on windows MRI but not windows JRuby
From:
Bosko Ivanisevic
Date:
12/4/09 8:29 AM
To:
ruby-ffi@googlegroups.com



On Fri, Dec 4, 2009 at 3:18 PM, Bosko Ivanisevic <bosko.ivanisevic@gmail.com> wrote:

On Wed, Dec 2, 2009 at 2:53 PM, Jon <jon.forums@gmail.com> wrote:
 > What versions of MRI are you using [as in compile--mingw, etc.]
> are you using pre built gems?

From the original post's DETAILS section, my setup below.  The MRI is RubyInstaller (mingw) RC1.

The FFI 0.5.3 gem is the prebuilt mingw binary.  It also segfaults with the prebuilt mingw 0.5.4 gem.

Thanks, Jon


> ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

> gem --version
1.3.5

> gem list ffi

*** LOCAL GEMS ***
ffi (0.5.3)

I've cloned ffi, executed:

rake install

and with new installation enumerating desktop windows sample works without problems except that sample on the Wiki has one error. Line:

if not Win.EnumDesktopWindows

should be:

if not Win.enum_desktop_windows

and in order to display window title puts command should be:

puts "[%03i] Found '%s'" % [ win_count += 1, title.get_string(0) ]

I was using Rubyinstaller 1.8.6. version of Ruby (mingw) with devkit to build ffi gem.


Just tried same but with 1.9.1 and everything works just fine. Obviously there is an error in binary gem, not in FFI code.

Regards,
Bosko Ivanisevic