cross-thread violation #21

flashmonkey opened this Issue Mar 7, 2011 · 12 comments

4 participants


Just installed buildr-as3 via gem, cloned the sample project and ran

buildr compile

and i get this

[BUG] cross-thread violation on rb_gc()

Abort trap

my ruby version is (via ruby -v)

ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10]

any ideas what might be causing this?


Can you post the output of "$ gem env" and "$ buildr --version".
Did you install ruby or rubygems manually?


Check out RVM, maybe that will help:


thanks for responding :)

gem env gives

  • RUBY VERSION: 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10]
  • INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /opt/local/bin/ruby
  • EXECUTABLE DIRECTORY: /opt/local/bin
    • ruby
    • x86-darwin-10
    • /opt/local/lib/ruby/gems/1.8
    • /Users/admin/.gem/ruby/1.8
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000

buildr --version gives the same thread violation error

i'll check out rvm now and see if that helps



Looks like you did install ruby via macports?
That gave me some hickups too. Using the preinstalled macruby works fine.


installed rvm and used ruby 1.9.2 and got the same thread error.... which version of ruby should i use for this to work?


Any progress on this?


I digged deeper into this, and this is an issue with the precompiled darwin(OSX) binary that comes with buildr.
I tried to get it working with RVM(multiple Ruby versions) but I always end up having the same issue as you have.
I will close this issue here and file a report at the buildr bug tracker. Hit me up on twitter/e-mail and we'll see how we can resolve this.


Was this bug ever filed to the buildr bug tracker? I searched but I wasn't able to find it.


Hi bluehex,

I could nail this bug down to the native extensions of the ruby-java-bridge (rjb) on Mac OSX.
What you want to do to fix this is the following:

gem uninstall rjb
gem uninstall buildr

When asked just uninstall all versions.

gem install rjb -v 1.3.3 --platform ruby
gem install buildr

This will install the ruby version of rjb and not the native darwin version.

This should fix the issue.

Cheers Dominic


Hi devboy,

Thanks so much for the quick reply. This worked great for me on my 1.9.2 rvm install.


Glad I could help. Let me know if you have questions about buildr and/or buildr-as3. Twitter: devboy_org


do you have an idea why this fix is not working with bundler?

i use this in my gemfile:

gem "rjb", '1.3.3', :platform => 'ruby'
gem "buildr"

but it's still giving me the gc-error.

when i install it directly, everything is fine :(

any ideas?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment