Bug #8372

Segmentation fault with Factory Girl when using :class, typo on related factory

Added by Jay Shirley over 2 years ago. Updated over 2 years ago.

ruby -v:ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN


This bug is partially the result of a typo, partially learning and switching things around in FactoryGirl, and resulting in a seg fault

I have a nested ActiveRecord model (Person::Identity), when I define a FactoryGirl factory for testing (under rspec) I created a segmentation fault.

The factory is pretty simple, albeit incorrect:

FactoryGirl.define do
factory :person_identity, :class => Person::Identity do
sequence(:email) { |i| "user-#{i}@example.com" }

factory :person do
  sequence(:email) { |i| "user-#{i}@example.com" }
  name 'Bob Hope'
  after_create do |person|
    FactoryGirl.create(:person_identity, :persond => person) # <-- typo here, should be "person", not sure where the "d" came from. 

With this in place, ruby 2.0.0-p0 repeatedly segfaulting.

Attached is the error log and OS X Diagnostic log.

I'm very new into the Ruby world, please accept my apologies if this bug report is incomplete or missing crucial information (and the Code Formatting doesn't seem to Preview correctly)



error.log Magnifier (1.55 MB) Jay Shirley, 05/07/2013 02:29 AM

ruby_2013-05-06-102624_Trafford.crash (50.1 KB) Jay Shirley, 05/07/2013 02:29 AM


#1 Updated by Zachary Scott over 2 years ago

  • Status changed from Open to Rejected

This is a duplicate of #8100

Please try it again with trunk.

#2 Updated by Nobuyoshi Nakada over 2 years ago

  • Description updated (diff)

Also available in: Atom PDF