# Yet Another Segmentation Fault

**URL:** <https://www.ruby-forum.com/t/yet-another-segmentation-fault/202856>\
**Category:** wxRuby\
**Created:** [February 7, 2011, 9:48pm UTC](https://www.ruby-forum.com/t/yet-another-segmentation-fault/202856 "2011-02-07T21:48:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 7, 2011, 9:48pm UTC](https://www.ruby-forum.com/t/yet-another-segmentation-fault/202856/1 "2011-02-07T21:48:21Z")

</div>

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 `’

[NOTE]  
You may encounter a bug of Ruby interpreter. Bug reports are welcome.  
For details: [http://www.ruby-lang.org/bugreport.html](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?

---

<div class="post-metadata">

**Author:** ![garison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a88e57/32.png) [@garison](https://www.ruby-forum.com/u/garison)\
**Post date:** [February 7, 2011, 10:47pm UTC](https://www.ruby-forum.com/t/yet-another-segmentation-fault/202856/2 "2011-02-07T22:47:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![garison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a88e57/32.png) [@garison](https://www.ruby-forum.com/u/garison)\
**Post date:** [February 8, 2011, 2:05am UTC](https://www.ruby-forum.com/t/yet-another-segmentation-fault/202856/3 "2011-02-08T02:05:47Z")

</div>

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
