Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested use with factory girl causes Segmentation fault #49

Open
oleander opened this issue Oct 1, 2013 · 0 comments
Open

Nested use with factory girl causes Segmentation fault #49

oleander opened this issue Oct 1, 2013 · 0 comments

Comments

@oleander
Copy link

oleander commented Oct 1, 2013

I've this structure.

class StaticPlaylist < ActiveRecord::Base
  acts_as_superclass
end

class ImportedPlaylist < ActiveRecord::Base
  acts_as :static_playlist
  acts_as_superclass
end

class DigiPlaylist < ActiveRecord::Base
  acts_as :imported_playlist
end

When I try creating a DigiPlaylist using factory girl I get this error.

<ruby-root>/gems/acts_as_relation-1.0.0/lib/active_record/acts_as_relation.rb:83: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.

-- Control frame information -----------------------------------------------
<ruby-root>/gems/acts_as_relation-1.0.0/lib/active_record/acts_as_relation.rb:83: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.

Here is the full stacktrace.
It looks like an infinitive loop.

My factory looks like this.

FactoryGirl.define do
  factory(:digi_playlist) do
  end
end

I looks like the problem is explained in pull request #8.

endless loop at time of creation in some cases (as example creation through Factory Girl Proxy)

How can we solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant