# Rake spec:rcov =\> Segmentation fault ruby 1.8.6 (2007-09-24) \[i386-mswin32\]

**URL:** <https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516>\
**Category:** Ruby\
**Created:** [September 14, 2008, 2:15am UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516 "2008-09-14T02:15:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 14, 2008, 2:15am UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/1 "2008-09-14T02:15:57Z")

</div>

i have a rails app that tests fine with “rake spec” but gets a  
segmentation fault when “rake spec:rcov” is run.  
i am on windows xp, ruby 1.8.6, rails 2.1.1, mysql 5

my app is at  
[http://github.com/scottnj/test\_blog/tree/master](http://github.com/scottnj/test_blog/tree/master)  
so maybe someone can try to replicate my error so i know if the  
problem is with my code or something installed on my pc.

here is a copy of my shell output

> > rake spec:rcov --trace

(in C:/Documents and Settings/Scott/My Documents/NetBeansProjects/  
blog)  
\*\* Invoke spec:rcov (first\_time)  
\*\* Invoke spec:clobber\_rcov (first\_time)  
\*\* Execute spec:clobber\_rcov  
\*\* Execute spec:rcov  
…generated  
code (c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/  
action\_controller/routing/route.rb:86):1: [BUG] Segmentation fault  
ruby 1.8.6 (2007-09-24) [i386-mswin32]

This application has requested the Runtime to terminate it in an  
unusual way.  
Please contact the application’s support team for more information.  
rake aborted!  
Command c:/ruby/bin/ruby -I"C:/Documents and Settings/Scott/My  
Documents/NetBeansProjects/blog/vendor/plugins/rspec/lib" -S rcov –  
exclude “spec/_,gems/_” --rails -o “coverage” “C:/Documents and  
Settings/Scott/My Documents/NetBeansProjects/blog/vendor/plugins/rspec/  
bin/spec” – “spec/controllers/access\_control\_spec.rb” “spec/  
controllers/authenticated\_system\_spec.rb” “spec/controllers/  
blogs\_controller\_spec.rb” “spec/controllers/blogs\_routing\_spec.rb”  
“spec/controllers/sessions\_controller\_spec.rb” “spec/controllers/  
users\_controller\_spec.rb” “spec/helpers/blogs\_helper\_spec.rb” “spec/  
helpers/users\_helper\_spec.rb” “spec/models/blog\_spec.rb” “spec/models/  
user\_spec.rb” “spec/views/blogs/edit.html.erb\_spec.rb” “spec/views/  
blogs/index.html.erb\_spec.rb” “spec/views/blogs/new.html.erb\_spec.rb”  
“spec/views/blogs/show.html.erb\_spec.rb” --options "  
C:/Documents and Settings/Scott/My Documents/NetBeansProjects/blog/  
spec/spec.opts" failed  
C:/Documents and Settings/Scott/My Documents/NetBeansProjects/blog/  
vendor/plugins/rspec/lib/spec/rake/spectask.rb:177:in `define' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose’  
C:/Documents and Settings/Scott/My Documents/NetBeansProjects/blog/  
vendor/plugins/rspec/lib/spec/rake/spectask.rb:153:in `define' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke\_with\_call\_chain’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in  
`synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke\_with\_call\_chain’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke\_task’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard\_exception\_handling’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in  
`standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31  
c:/ruby/bin/rake:16:in `load’  
c:/ruby/bin/rake:16

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 14, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/2 "2008-09-14T21:55:53Z")

</div>

On Sep 13, 9:10 pm, scott [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > rake spec:rcov --trace  
> > > ruby 1.8.6 (2007-09-24) [i386-mswin32]
> 
> This application has requested the Runtime to terminate it in an  
> unusual way.  
> Please contact the application’s support team for more information.  
> rake aborted!

You could try changing your spec/spec.opts to offer more details  
(instead of default progress maybe spec format).

That will be more simple than for us replicate your exact environment  
(ruby version, gem and such).

Regards,

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 14, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/3 "2008-09-14T23:45:41Z")

</div>

i added --spec format to the bottom of my spec.opts so it looks like  
this  
–colour  
–format progress  
–loadby mtime  
–reverse  
–spec format

i’m not sure if this is what you meant. i did a quick search on google  
for some documentation on this file but didn’t find anything.  
anyway, now i am not getting the segmentation fault but “0 examples, 0  
failures” so i think i’m doing something wrong.

> > rake spec:rcov --trace  
> > (in C:/Documents and Settings/Scott/My Documents/NetBeansProjects/  
> > blog)  
> > \*\* Invoke spec:rcov (first\_time)  
> > \*\* Invoke spec:clobber\_rcov (first\_time)  
> > \*\* Execute spec:clobber\_rcov  
> > \*\* Execute spec:rcov  
> > Finished in 1.594 seconds  
> > 0 examples, 0 failures

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 15, 2008, 3:56am UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/4 "2008-09-15T03:56:03Z")

</div>

Sent wirelessly via BlackBerry from T-Mobile.

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 15, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/5 "2008-09-15T19:52:35Z")

</div>

On Sep 14, 6:43 pm, scott [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i added --spec format to the bottom of my spec.opts so it looks like  
> this  
> –colour  
> –format progress  
> –loadby mtime  
> –reverse  
> –spec format

spec --help:

Builtin formats for examples:  
progress|p : Text progress  
profile|o : Text progress with profiling of 10 slowest  
examples  
specdoc|s : Example doc as text  
html|h : A nice HTML report

so you need to change --format to: specdoc (and remove the --spec one)

> i’m not sure if this is what you meant. i did a quick search on google  
> for some documentation on this file but didn’t find anything.  
> anyway, now i am not getting the segmentation fault but “0 examples, 0  
> failures” so i think i’m doing something wrong.

You’re not getting segfault because your code is not being executed :-  
D

Change the spec.opts options again and let us know 🙂

Regards,

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [October 5, 2008, 7:25am UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/6 "2008-10-05T07:25:40Z")

</div>

–colour  
–format specdoc  
–loadby mtime  
–reverse

still gives the seg-fault?

c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action\_mailer/  
vendor/tmail-1.2.3/tmail/port.rb:343: [BUG] Segmentation fault  
ruby 1.8.6 (2007-09-24) [i386-mswin32]

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [October 5, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/rake-spec-rcov-segmentation-fault-ruby-1-8-6-2007-09-24-i386-mswin32/148516/7 "2008-10-05T17:20:54Z")

</div>

Scott Nj wrote:

> –colour  
> –format specdoc  
> –loadby mtime  
> –reverse
> 
> still gives the seg-fault?
> 
> c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action\_mailer/  
> vendor/tmail-1.2.3/tmail/port.rb:343: [BUG] Segmentation fault  
> ruby 1.8.6 (2007-09-24) [i386-mswin32]

This only happens to you while running specs with rcov, correct?

Based on your first message and the last one, it seems the segmentation  
fault is random (not always happens in the same place).

Maybe there is something in rspec or rcov that is affecting the runtime  
stability.

Will try to clone your repo and see what I can find.

## Regards,

Luis L.
