Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation error under ruby 2.5.0 #80

Closed
slevik opened this issue Aug 4, 2018 · 2 comments
Closed

Segmentation error under ruby 2.5.0 #80

slevik opened this issue Aug 4, 2018 · 2 comments

Comments

@slevik
Copy link

slevik commented Aug 4, 2018

https://github.com/ArturT/knapsack/blob/4d2fb4d283db03c2fb3b20afb697a1e536555dd6/lib/knapsack/presenter.rb#L82

pry(Knapsack::Presenter)> seconds
=> 700.0878098011017

time = Time.at(seconds).gmtime.strftime('%Hh %Mm %Ss') gives me error

gems/knapsack-1.16.0/lib/knapsack/presenter.rb:82: [BUG] Segmentation fault at 0x0000000000004001

@ArturT
Copy link
Member

ArturT commented Aug 5, 2018

I've tested this line on ruby 2.5.0 and 2.5.1 and I cannot reproduce it. The test suite for knapsack gem is green for both ruby versions.

ruby-2.5.0
$ irb
2.5.0 :001 > seconds=700.0878098011017
 => 700.0878098011017
2.5.0 :002 >  time = Time.at(seconds).gmtime.strftime('%Hh %Mm %Ss')
 => "00h 11m 40s"
ruby-2.5.1
$ irb
2.5.1 :001 > seconds=700.0878098011017
 => 700.0878098011017
2.5.1 :002 > time = Time.at(seconds).gmtime.strftime('%Hh %Mm %Ss')
 => "00h 11m 40s"

What system do you use? Can you try to reinstall ruby?

You may want to try https://knapsackpro.com with Queue Mode to dynamically allocate tests across parallel CI nodes to solve a few problems. More examples here https://youtu.be/hUEB1XDKEFY

@slevik
Copy link
Author

slevik commented Aug 6, 2018

You know, I've figured it out (hacked) by removing gem "math" from the Bundle. I don't know what was the reason, but when I include "math" gem into 2.5.0 I'm getting the issue ^^.
Thanks.

@ArturT ArturT closed this as completed Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants