#243 open
JM

"Segmentation fault" when visiting Rails action with infinite loop

Reported by JM | May 11th, 2009 @ 06:17 AM

Using cucumber 0.3.2 + webrat 0.4.4, I had a "segmentation fault" problem when calling visit with Rails action with an infinite loop within a catch clause.

I had to run mongrels & debug to diagnose the problem as cucumber + webrat would always "Segmentation fault" silently instead of displaying a stacktrace.

I have reproduced the problem with this commit: http://github.com/garnierjm/webr...

In order to solve this problem, I think we could replace the self.class_eval by code generation. I am a kind of newbie with Rails (2 years) but I believe "eval" is slow so fixing this problem might end up speeding up webrat a bit as well.

At the end of day, my problem was due to a bad design in a plugin I was using, not webrat but I hope my commit will prevent others to waste time in similar situations.

Details of the problem here: http://www.nabble.com/-cucumber-...

Comments and changes to this ticket

  • JM

    JM May 11th, 2009 @ 06:56 AM

    running the spec I have added won't do a segmentation fault. You'll have to run it with ruby:

    WEBRAT_INTEGRATION_MODE=rails ruby spec/integration/rails/test/integration/webrat_test.rb /Users/jeanmichel/Projects/webrat/lib/webrat.rb:10: warning: already initialized constant VERSION Loaded suite spec/integration/rails/test/integration/webrat_test Started ........Segmentation fault

  • gaffo

    gaffo May 15th, 2009 @ 08:57 PM

    • State changed from “new” to “open”

    not sure what to make of this, beyond my pay grade :)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Pages