Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Does not seem to work on Ruby 2.0 #2

Open
mikelitton opened this issue Nov 10, 2013 · 5 comments
Open

Does not seem to work on Ruby 2.0 #2

mikelitton opened this issue Nov 10, 2013 · 5 comments

Comments

@mikelitton
Copy link

No description provided.

@pdenya
Copy link

pdenya commented Nov 26, 2013

Also not working for me, here's my segfault dump -

Loading development environment (Rails 4.0.0)
irb(main):001:0> data = [[1,1], [1,2], [1,1], [1000, 1000], [500, 500]]
=> [[1, 1], [1, 2], [1, 1], [1000, 1000], [500, 500]]
irb(main):002:0> kmeans = KMeans.new(data, :centroids => 2)
/Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/node.rb:61: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.
-- Control frame information -----------------------------------------------
c:0032 p:---- s:0135 e:000134 CFUNC  :euclidean_distance
c:0031 p:0018 s:0131 e:000130 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/node.rb:61
c:0030 p:0016 s:0127 e:000126 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/node.rb:56
c:0029 p:0016 s:0123 e:000122 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/node.rb:23
c:0028 p:0013 s:0118 e:000116 BLOCK  /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/k_means.rb:57 [FINISH]
c:0027 p:---- s:0114 e:000113 CFUNC  :each
c:0026 p:0014 s:0111 e:000110 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/k_means.rb:56
c:0025 p:0052 s:0107 e:000105 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/k_means.rb:33
c:0024 p:0095 s:0101 e:000100 METHOD /Library/Ruby/Gems/2.0.0/gems/k_means-0.0.7/lib/k_means/k_means.rb:14 [FINISH]
c:0023 p:---- s:0095 e:000094 CFUNC  :new
c:0022 p:0019 s:0090 E:0026f0 EVAL   (irb):2 [FINISH]
c:0021 p:---- s:0087 e:000086 CFUNC  :eval
c:0020 p:0024 s:0080 e:000079 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb/workspace.rb:86
c:0019 p:0025 s:0073 e:000071 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb/context.rb:380
c:0018 p:0022 s:0067 e:000066 BLOCK  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:492
c:0017 p:0040 s:0059 e:000058 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:624
c:0016 p:0009 s:0054 e:000053 BLOCK  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:489
c:0015 p:0118 s:0050 e:000049 BLOCK  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:247 [FINISH]
c:0014 p:---- s:0047 e:000046 CFUNC  :loop
c:0013 p:0007 s:0044 e:000043 BLOCK  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:233 [FINISH]
c:0012 p:---- s:0042 e:000041 CFUNC  :catch
c:0011 p:0015 s:0038 e:000037 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb/ruby-lex.rb:232
c:0010 p:0030 s:0035 E:001cb8 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:488
c:0009 p:0008 s:0032 e:000031 BLOCK  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:397 [FINISH]
c:0008 p:---- s:0030 e:000029 CFUNC  :catch
c:0007 p:0143 s:0026 E:001f98 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/irb.rb:396
c:0006 p:0158 s:0021 e:000020 METHOD /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:90
c:0005 p:0011 s:0018 e:000017 METHOD /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:9
c:0004 p:0508 s:0014 e:000013 TOP    /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:64 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC  :require
c:0002 p:0034 s:0004 E:000028 EVAL   bin/rails:4 [FINISH]
c:0001 p:0000 s:0002 E:001538 TOP    [FINISH]

@furtherLee
Copy link

Same problem. The sample could not work for ruby 2.0.0p247

@ql
Copy link

ql commented Mar 12, 2014

Doesn't work on ruby 1.9.3 too
(1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0])

@marker68
Copy link

Worked for me in Ruby 2.1.0
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]

@gsdean
Copy link

gsdean commented Sep 24, 2014

same error
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin12.5.0]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants