Ruby 1.9.2-p0 crashes

82 views
Skip to first unread message

Arve Knudsen

unread,
Oct 19, 2010, 12:06:15 PM10/19/10
to rubyin...@googlegroups.com
Hello

I've just installed the latest Cucumber (from git) on Ruby 1.9.2-p0 installed by RubyInstaller, and just invoking cucumber causes ruby to crash. The error message looks like this:

[BUG] cross-thread violation on rb_gc()
(null)


Please help :(

Thanks,
Arve

Luis Lavena

unread,
Oct 19, 2010, 12:08:58 PM10/19/10
to rubyin...@googlegroups.com
On Tue, Oct 19, 2010 at 1:06 PM, Arve Knudsen <arve.k...@gmail.com> wrote:
> Hello
> I've just installed the latest Cucumber (from git) on Ruby 1.9.2-p0
> installed by RubyInstaller, and just invoking cucumber causes ruby to crash.
> The error message looks like this:
> [BUG] cross-thread violation on rb_gc()
> (null)
>

I believe I commented something to you before in the cucumber mailing list.

However, the error was related to a gem using Ruby 1.8.x (msvcrt-ruby18.dll)

Please provide the backtrace that you're getting the error. Try
running cucumber with trace/verbose options (dunno how)

It could be a gem that cucumber uses that is triggering this.

We need more information to recreate the issue, like some sample code
(always provide that, is very helpful)

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Arve Knudsen

unread,
Oct 19, 2010, 12:15:09 PM10/19/10
to rubyin...@googlegroups.com
On Tue, Oct 19, 2010 at 6:08 PM, Luis Lavena <luisl...@gmail.com> wrote:
On Tue, Oct 19, 2010 at 1:06 PM, Arve Knudsen <arve.k...@gmail.com> wrote:
> Hello
> I've just installed the latest Cucumber (from git) on Ruby 1.9.2-p0
> installed by RubyInstaller, and just invoking cucumber causes ruby to crash.
> The error message looks like this:
> [BUG] cross-thread violation on rb_gc()
> (null)
>

I believe I commented something to you before in the cucumber mailing list.

Really? I must've missed your reply somehow.
 
Please provide the backtrace that you're getting the error. Try
running cucumber with trace/verbose options (dunno how)

Using ruby's -v option produced a trace at least:

PS C:\Users\arvek\Projects\BuildTools> ruby -v C:\Ruby192\bin\cucumber -h
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.9.3/lib/cucumber/ast/table.rb:380: warning: shadowing outer local variabl
e - hash
<internal:lib/rubygems/custom_require>:29: warning: loading in progress, circular require considered harmful - C:/Ruby19
2/lib/ruby/gems/1.9.1/gems/cucumber-0.9.3/lib/cucumber/cli/main.rb
        from C:/Ruby192/bin/cucumber:19:in `<main>'
        from C:/Ruby192/bin/cucumber:19:in `load'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.9.3/bin/cucumber:5:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.9.3/lib/cucumber/cli/main.rb:8:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.9.3/lib/cucumber.rb:8:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
[BUG] cross-thread violation on rb_gc()
(null)
 
We need more information to recreate the issue, like some sample code

(always provide that, is very helpful)

Well, the only sample code is cucumber. Just invoking it is enough.

Arve 

Boško Ivanišević

unread,
Oct 19, 2010, 12:39:54 PM10/19/10
to rubyin...@googlegroups.com
How did you install cucumber 0.9.3? Running:

gem search -r cucumber

shows that latest version is 0.9.2 and that is the version I use with Rubyinstaller 1.9.2 without problem. Although you might get some problems with json and nokogiri if prebuilt versions are installed since they are linked against 1.8.6 Ruby dll.

--
Regards,
Boško Ivanišević

Arve Knudsen

unread,
Oct 19, 2010, 12:41:14 PM10/19/10
to rubyin...@googlegroups.com
2010/10/19 Boško Ivanišević <bosko.iv...@gmail.com>
I'm installing Cucumber from Git as stated in my original mail.

Arve 

Boško Ivanišević

unread,
Oct 19, 2010, 1:00:02 PM10/19/10
to rubyin...@googlegroups.com
2010/10/19 Arve Knudsen <arve.k...@gmail.com>
Sorry, missed that. Can you try with 0.9.2 release and not this development version first just to check if everything is working on your side? I haven't tried development version of cucumber and I'm not sure if it is really working.

--
Regards,
Boško Ivanišević

Luis Lavena

unread,
Oct 19, 2010, 1:00:14 PM10/19/10
to rubyin...@googlegroups.com

I cannot reproduce:

C:\Users\Luis\projects\oss>git clone git://github.com/aslakhellesoy/cucumber.git
...

C:\Users\Luis\projects\oss>cd cucumber

C:\Users\Luis\Projects\oss\cucumber>ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\Users\Luis\Projects\oss\cucumber>ruby -Ilib bin\cucumber
<internal:lib/rubygems/custom_require>:29:in `require': no such file
to load -- gherkin (LoadError)


from <internal:lib/rubygems/custom_require>:29:in `require'

from C:/Users/Luis/Projects/oss/cucumber/lib/cucumber/cli/main.rb:5:in
`rescue in <top (required)>'
from C:/Users/Luis/Projects/oss/cucumber/lib/cucumber/cli/main.rb:1:in


`<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'

from bin/cucumber:5:in `<main>'

C:\Users\Luis\Projects\oss\cucumber>gem install gherkin
Successfully installed term-ansicolor-1.0.5
Successfully installed gherkin-2.2.9-x86-mingw32
2 gems installed

C:\Users\Luis\Projects\oss\cucumber>ruby -Ilib bin\cucumber -h
*** WARNING: You must "gem install win32console" (1.2.0 or higher) to
get coloured output on MRI/Windows
Usage: cucumber [options] [ [FILE|DIR|URL][:LINE[:LINE]*] ]+

Examples:
cucumber examples/i18n/en/features
cucumber @rerun.txt (See --format rerun)
cucumber examples/i18n/it/features/somma.feature:6:98:113
cucumber -s -i http://rubyurl.com/eeCl

[...]

Can you try the same steps?

Boško Ivanišević

unread,
Oct 19, 2010, 2:58:12 PM10/19/10
to rubyin...@googlegroups.com
2010/10/19 Arve Knudsen <arve.k...@gmail.com>
What is result of:

gem list 

--
Regards,
Boško Ivanišević

Arve Knudsen

unread,
Oct 19, 2010, 3:09:28 PM10/19/10
to rubyin...@googlegroups.com
2010/10/19 Boško Ivanišević <bosko.iv...@gmail.com>
PS C:\Users\Arve\Projects\Cucumber> gem list

*** LOCAL GEMS ***

builder (2.1.2)
bundler (1.0.3)
cucumber (0.9.3)
diff-lcs (1.1.2)
gherkin (2.2.9 x86-mingw32)
json (1.4.6 x86-mingw32)
minitest (1.6.0)
nokogiri (1.4.3.1 x86-mingw32)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rake (0.8.7)
rdoc (2.5.8)
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
spork (0.8.4)
syntax (1.0.0)
term-ansicolor (1.0.5) 

Luis Lavena

unread,
Oct 19, 2010, 3:12:03 PM10/19/10
to rubyin...@googlegroups.com
2010/10/19 Arve Knudsen <arve.k...@gmail.com>:

>
> PS C:\Users\Arve\Projects\Cucumber> gem list
> *** LOCAL GEMS ***
> builder (2.1.2)
> bundler (1.0.3)
> cucumber (0.9.3)
> diff-lcs (1.1.2)
> gherkin (2.2.9 x86-mingw32)
> json (1.4.6 x86-mingw32)
> minitest (1.6.0)
> nokogiri (1.4.3.1 x86-mingw32)

Please uninstall json as that particular version lacks binaries for Ruby 1.9

That could be generating a segfault (bug) if you copied or installed
Ruby 1.8 to resolve a "missing msvcrt-ruby18.dll" popup.

To get JSON working please download the DevKit and follow the
installation instructions ehre:

http://rubyinstaller.org/downloads
http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Arve Knudsen

unread,
Oct 19, 2010, 3:46:23 PM10/19/10
to rubyin...@googlegroups.com
On Tue, Oct 19, 2010 at 9:12 PM, Luis Lavena <luisl...@gmail.com> wrote:
2010/10/19 Arve Knudsen <arve.k...@gmail.com>:
>
> PS C:\Users\Arve\Projects\Cucumber> gem list
> *** LOCAL GEMS ***
> builder (2.1.2)
> bundler (1.0.3)
> cucumber (0.9.3)
> diff-lcs (1.1.2)
> gherkin (2.2.9 x86-mingw32)
> json (1.4.6 x86-mingw32)
> minitest (1.6.0)
> nokogiri (1.4.3.1 x86-mingw32)

Please uninstall json as that particular version lacks binaries for Ruby 1.9

That could be generating a segfault (bug) if you copied or installed
Ruby 1.8 to resolve a "missing msvcrt-ruby18.dll" popup.

To get JSON working please download the DevKit and follow the
installation instructions ehre:

http://rubyinstaller.org/downloads
http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Thanks, installing json from source did the trick! I am at least able to run cucumber now, although I don't have access to the project I want to use it on until tomorrow. Hopefully this'll rid me of the dependency on Ruby 1.8.

Thanks so much,
Arve 
Reply all
Reply to author
Forward
0 new messages