Segmentation Fault on MRI #127

Closed
sergiocampama opened this Issue Jan 25, 2013 · 11 comments

3 participants

@sergiocampama

require 'gtk3' breaks ruby...

mindor:Desktop kaipi$ irb
1.9.3-p194 :001 > require 'gtk3'
/Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3.bundle: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.1.0]

-- Control frame information -----------------------------------------------
c:0036 p:-17587934884718 s:0137 b:0137 l:000136 d:000136 TOP

c:0035 p:---- s:0135 b:0135 l:000134 d:000134 CFUNC :require
c:0034 p:0036 s:0131 b:0131 l:000130 d:000130 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
c:0033 p:0029 s:0124 b:0124 l:000120 d:000123 BLOCK /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3/base.rb:18
c:0032 p:0159 s:0121 b:0121 l:000120 d:000120 TOP /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3/base.rb:14
c:0031 p:---- s:0113 b:0113 l:000112 d:000112 FINISH
c:0030 p:---- s:0111 b:0111 l:000110 d:000110 CFUNC :require
c:0029 p:0036 s:0107 b:0107 l:000106 d:000106 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
c:0028 p:0011 s:0100 b:0100 l:000099 d:000099 TOP /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3.rb:7
c:0027 p:---- s:0098 b:0098 l:000097 d:000097 FINISH
c:0026 p:---- s:0096 b:0096 l:000095 d:000095 CFUNC :require
c:0025 p:0089 s:0092 b:0092 l:000088 d:000091 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60
c:0024 p:0158 s:0089 b:0089 l:000088 d:000088 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35
c:0023 p:0011 s:0082 b:0082 l:000228 d:000081 EVAL (irb):1
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :eval
c:0020 p:0028 s:0071 b:0071 l:000070 d:000070 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0033 s:0064 b:0063 l:000062 d:000062 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/context.rb:254
c:0018 p:0031 s:0058 b:0058 l:000758 d:000057 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:159
c:0017 p:0042 s:0050 b:0050 l:000049 d:000049 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:273
c:0016 p:0011 s:0045 b:0045 l:000758 d:000044 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:156
c:0015 p:0144 s:0041 b:0041 l:000024 d:000040 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0008 p:0046 s:0022 b:0022 l:000758 d:000758 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:155
c:0007 p:0011 s:0019 b:0019 l:000b88 d:000018 BLOCK /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:70
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0183 s:0011 b:0011 l:000b88 d:000b88 METHOD /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69
c:0003 p:0142 s:0006 b:0006 l:001cb8 d:001d78 EVAL /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001cb8 d:001cb8 TOP

-- Ruby level backtrace information ----------------------------------------
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in <main>'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in
start'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in catch'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:70:in
block in start'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:155:in eval_input'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
each_top_level_statement'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
block in each_top_level_statement'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in
block (2 levels) in each_top_level_statement'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:156:in block in eval_input'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:273:in
signal_status'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:159:in block (2 levels) in eval_input'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/context.rb:254:in
evaluate'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in
eval'
(irb):1:in irb_binding'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in
require'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in rescue in require'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
require'
/Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3.rb:7:in <top (required)>'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require'
/Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3/base.rb:14:in
'
/Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gtk3-1.2.0/lib/gtk3/base.rb:18:in rescue in <top (required)>'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
/Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

-- C level backtrace information -------------------------------------------

See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

  • Loaded script: irb

  • Loaded features:

    0 enumerator.so
    1 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/enc/encdb.bundle
    2 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/enc/trans/transdb.bundle
    3 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    4 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/rbconfig.rb
    5 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    6 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    7 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    8 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb
    9 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/e2mmap.rb
    10 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/init.rb
    11 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb
    12 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/inspector.rb
    13 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/context.rb
    14 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/extend-command.rb
    15 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/output-method.rb
    16 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/notifier.rb
    17 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/slex.rb
    18 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-token.rb
    19 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb
    20 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/src_encoding.rb
    21 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/magic-file.rb
    22 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/readline.bundle
    23 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/input-method.rb
    24 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/locale.rb
    25 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb
    26 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
    27 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
    28 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
    29 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
    30 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
    31 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
    32 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb
    33 /Users/kaipi/.rvm/scripts/irbrc.rb
    34 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/pathname.bundle
    35 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/pathname.rb
    36 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/English.rb
    37 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/thread.rb
    38 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/glib2-1.2.0/lib/glib2/deprecatable.rb
    39 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/glib2-1.2.0/lib/glib2.bundle
    40 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/glib2-1.2.0/lib/glib2.rb
    41 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/atk-1.2.0/lib/atk.bundle
    42 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/atk-1.2.0/lib/atk.rb
    43 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/color.rb
    44 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/paper.rb
    45 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo.bundle
    46 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/constants.rb
    47 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/point.rb
    48 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/colors.rb
    49 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/papers.rb
    50 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/rectangle.rb
    51 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/triangle.rb
    52 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/circle.rb
    53 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/path.rb
    54 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/blur.rb
    55 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context/color.rb
    56 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/context.rb
    57 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/device.rb
    58 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/surface.rb
    59 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/pattern.rb
    60 /Users/kaipi/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/forwardable.rb
    61 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo/path.rb
    62 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/cairo-1.12.3/lib/cairo.rb
    63 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/pango-1.2.0/lib/pango.bundle
    64 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/pango-1.2.0/lib/pango.rb
    65 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk_pixbuf2-1.2.0/lib/gdk_pixbuf2.bundle
    66 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk_pixbuf2-1.2.0/lib/gdk_pixbuf2.rb
    67 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk3-1.2.0/lib/gdk3.bundle
    68 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk3-1.2.0/lib/gdk3/base.rb
    69 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk3-1.2.0/lib/gdk3/deprecated.rb
    70 /Users/kaipi/.rvm/gems/ruby-1.9.3-p194/gems/gdk3-1.2.0/lib/gdk3.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6

@jeremedia

I've the same exact problem as sergiocampama.

@kou
Ruby-GNOME2 Project member

Could you show your ~/Library/Logs/CrashReporter?

@sergiocampama

Mine is empty. /Library/Logs/CrashReporter is also empty... I am using rvm on mac and macports to install the libraries needed for the gtk gem and its's dependencies

@kou
Ruby-GNOME2 Project member

Oh...

@kou kou added a commit that closed this issue Jan 30, 2013
@kou kou gtk3: add gtk_XXX prefix to GDK integration init functions
GitHub: close #127

Because Init_gdk_screen() is conflicted with the same name function in
Ruby/GDK3 on Mac OS X.

We don't extern internal Init_*() functions by G_GNUC_INTERNAL but it
is not worked on Mac OS X. Because clang is used instead of gcc on Mac
OS X.

Reported by Sergio Campama. Thanks!!!

Backtrace is provided by Watson. Thanks!!!
f342f7d
@kou kou closed this in f342f7d Jan 30, 2013
@kou
Ruby-GNOME2 Project member

Maybe I fixed it in master.
@Watson1978 provided me backtrace for the problem: https://gist.github.com/4656841
Thanks!

@sergiocampama

how can I test it from master? is it released to rubygems already?

thanks for all the work!

best regards,

@kou
Ruby-GNOME2 Project member

You can test by the following command:

% git clone https://github.com/ruby-gnome2/ruby-gnome2
% cd ruby-gnome2
% rake gem:build gem:install

I'll release gems soon. :-)

Thanks for your report!

@kou
Ruby-GNOME2 Project member

I've released! Please confirm it.

@sergiocampama

I can confirm that 1.2.1 works on Mac... Although there is a warning stating

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

But it indeed works... Thanks!

@kou
Ruby-GNOME2 Project member

Thanks for confirming!

@jeremedia

I had to update to 1.9.3p374 from 1.9.3-p327, but the gem now starts normally on 10.8.2. Thank you for your work on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment