Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

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

 
 
scott
Guest
Posts: n/a
 
      09-14-2008
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
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
 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      09-14-2008
On Sep 13, 9:10*pm, scott <(E-Mail Removed)> 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/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!


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
 
Reply With Quote
 
 
 
 
scott
Guest
Posts: n/a
 
      09-14-2008
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 <(E-Mail Removed)> wrote:
> On Sep 13, 9:10*pm, scott <(E-Mail Removed)> 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/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!

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


 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      09-15-2008
On Sep 14, 6:43*pm, scott <(E-Mail Removed)> 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
 
Reply With Quote
 
scott
Guest
Posts: n/a
 
      10-05-2008
--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 <(E-Mail Removed)> wrote:
> On Sep 14, 6:43*pm, scott <(E-Mail Removed)> 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


 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      10-05-2008
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-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rake segmentation fault Zouplaz Ruby 1 04-11-2007 05:14 AM
Rake and rake aborted! Rake aborted! undefined method `gem' for main:Object peppermonkey Ruby 1 02-10-2007 04:43 AM
mysql-ruby segmentation fault when closing connection miklawlor@gmail.com Ruby 3 04-27-2006 06:21 PM
ruby-1.8.2: test.rb:593: [BUG] Segmentation fault me2faster@excite.com Ruby 2 05-18-2005 05:20 PM
[Ruby-gnome2][Bug] segmentation fault with ComboBox and spanish characters David Espada Ruby 6 03-05-2004 08:19 AM



Advertisments