Forum: wxRuby Yet Another Segmentation Fault

87a841e4872ebd0a5c660c32493097db?d=identicon&s=25 Garison Piatt (garison)
on 2011-02-07 21:48
I've looked through the forum at the umpteen threads about segmentation
faults, and none of them seem to address my problem.  I'm hoping someone
can point out what I need to do.

Platform: Vista
Ruby v#: 1.9.1
wxRuby: 2.0.1


I'm running a minimal window, which I have on good authority will work:

  require "wx"
  include Wx

  class MinimalApp < App
    def on_init
         Frame.new(nil, -1, "The Bare Minimum").show()
    end
  end

  MinimalApp.new.main_loop


When I run it, I get the following:
==================================
C:\Ruby\apps>ruby minimal.rb
C:/Ruby/wxruby/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wxruby2.so:
[BUG] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

-- control frame ----------
c:0008 p:-9633262 s:0021 b:0021 l:000020 d:000020 TOP
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC  :require
c:0006 p:0011 s:0015 b:0015 l:000014 d:000014 TOP
C:/Ruby/wxruby/ruby/lib/rub
y/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:12
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :require
c:0003 p:0011 s:0006 b:0006 l:000e84 d:001e2c EVAL   minimal.rb:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000e84 d:000e84 TOP
---------------------------
-- Ruby level backtrace
information-----------------------------------------
C:/Ruby/wxruby/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:
12:in `require'
C:/Ruby/wxruby/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:
12:in `<top (required)>'
minimal.rb:1:in `require'
minimal.rb:1:in `<main>'

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
==================================

Any idea what I need to fix, replace, install or whatever to fix this?
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2011-02-07 22:47
(Received via mailing list)
Am 07.02.2011 21:48, schrieb Garison Piatt:
>
C:/Ruby/wxruby/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wxruby2.so:

That looks as if you installed the wxRuby gem for Ruby 1.8. Try

gem uninstall wxruby
gem install wxruby-ruby19

Vale,
Marvin
87a841e4872ebd0a5c660c32493097db?d=identicon&s=25 Garison Piatt (garison)
on 2011-02-08 02:05
Marvin Gülker wrote in post #980137:
> That looks as if you installed the wxRuby gem for Ruby 1.8. Try
> gem uninstall wxruby
> gem install wxruby-ruby19


You are a god.  Thank you.


-garison
This topic is locked and can not be replied to.