[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rake spec:rcov => [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32]

scott

9/14/2008 12:10:00 AM

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/t...
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
5 Answers

Luis Lavena

9/14/2008 7:55:00 PM

0

On Sep 13, 9:10 pm, scott <scot...@gmail.com> wrote:
> 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 athttp://github.com/scottnj/test_blog/t...
> 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!

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,
--
Luis Lavena

scott

9/14/2008 9:44:00 PM

0

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


On Sep 14, 3:54 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Sep 13, 9:10 pm, scott <scot...@gmail.com> wrote:
>
>
>
> > 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 athttp://github.com/scottnj/test_blog/t...
> > 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!
>
> 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,
> --
> Luis Lavena

Luis Lavena

9/15/2008 5:48:00 PM

0

On Sep 14, 6:43 pm, scott <scot...@gmail.com> 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,
--
Luis Lavena

scott

10/5/2008 5:20:00 AM

0

--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]


On Sep 15, 1:47 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Sep 14, 6:43 pm, scott <scot...@gmail.com> 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,
> --
> Luis Lavena

Luis Lavena

10/5/2008 3:19:00 PM

0

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 Lavena


--
Posted via http://www.ruby-....