cross-thread violation #21

Closed
flashmonkey opened this Issue Mar 7, 2011 · 12 comments

4 participants

@flashmonkey

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()
(null)

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?

@devboy
Owner

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

@devboy
Owner

Check out RVM, maybe that will help: http://rvm.beginrescueend.com/

@flashmonkey

thanks for responding :)

gem env gives

  • RUBYGEMS VERSION: 1.3.7
  • 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
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-darwin-10
  • GEM PATHS:
    • /opt/local/lib/ruby/gems/1.8
    • /Users/admin/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

buildr --version gives the same thread violation error

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

T

@devboy
Owner

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

@flashmonkey

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?

@devboy
Owner

Any progress on this?

@devboy
Owner

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.

@jakerr

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

@devboy
Owner

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

@jakerr

Hi devboy,

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

@devboy
Owner

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

@phoet

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