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

Discussion in 'Ruby' started by scott, Sep 14, 2008.

  1. scott

    scott Guest

    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
     
    scott, Sep 14, 2008
    #1
    1. Advertising

  2. scott

    Luis Lavena Guest

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

    On Sep 13, 9:10 pm, scott <> 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
     
    Luis Lavena, Sep 14, 2008
    #2
    1. Advertising

  3. scott

    scott Guest

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

    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 <> wrote:
    > On Sep 13, 9:10 pm, scott <> 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
     
    scott, Sep 14, 2008
    #3
  4. scott

    Luis Lavena Guest

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

    On Sep 14, 6:43 pm, scott <> 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, Sep 15, 2008
    #4
  5. scott

    scott Guest

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

    --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 <> wrote:
    > On Sep 14, 6:43 pm, scott <> 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, Oct 5, 2008
    #5
  6. scott

    Luis Lavena Guest

    Re: rake spec:rcov => Segmentation fault ruby 1.8.6 (2007-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-forum.com/.
     
    Luis Lavena, Oct 5, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Armin Roehrl
    Replies:
    1
    Views:
    114
    Jamey Cribbs
    Feb 13, 2004
  2. Gully Foyle
    Replies:
    0
    Views:
    106
    Gully Foyle
    Jul 19, 2004
  3. peppermonkey
    Replies:
    1
    Views:
    246
    Gregory Brown
    Feb 10, 2007
  4. Sereyvuth Hong
    Replies:
    1
    Views:
    159
  5. Replies:
    0
    Views:
    138
Loading...

Share This Page