On Jun 7, 2008, at 1:11 PM, Maurício Linhares wrote:

Hello again :)

I'm trying to run rcov on my specs here but i'm getting a lot of
segmentation faults (and they usually happen at different places):

/home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/lib/ active_record/attribute_methods.rb:211:
[BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]

/home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/core_ext/module/ introspection.rb:60:
[BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]

Is there any way to fix this?

I'm not sure about this, but I can tell you *my* one run in with rcov seg-faulting (maybe it will be of some use):

While testing FixtureReplacement, I decided to swap out Kernel#require for my specs. I didn't see any other option: My init.rb explicitly required a "db/example_data" file, and since I was testing it outside of a rails project there was no way to access a file which was outside of vendor/plugins/fixture_replacement. I tried the typical pattern of aliasing require, and overriding it, calling it only when the file didn't match "db/example_data.rb". At the time, the specs ran just fine. Much to my surpise, rcov segfaulted. I had to resort to the technique described on this page to get it to work: http://blog.jayfields.com/2006/12/ruby-alias-method-alternative.html

I still don't know why this happened. My guess is that between rcov and rubygems, both of which probably swap out require, someone wasn't playing nice. Or, come to think of it, maybe it was me!

General advice: I'd bet you could run the debugger (ruby-debug) on it, and see where it craps out...

Scott





I'm using rspec 1.1.4, rcov 0.8.1.2.0, rails 2.1 and Ubuntu Linux 8.4.

--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http:// blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to