Segfault in JSON - windows VISTA

I’ve been struggling for the past few hours with a segfault coming out
of JSON.

this is from the gem “json (1.1.1)” and “json (1.0.3)”

I was originally running the ruby 1.8.6 one-click-installer,
but reverted to 1.8.4 a moment ago, to see if it fixed the problem.

I’ve also tried varying the version of the JSON gem.

hmm…I can’t see how to fix this.
any ideas.

I guess maybe I should just revert back to WinXP,
it was working in 1.8.4 on XP MCE

MatthewRudy

==========================================================================
the output from my rails console running json 1.1.1

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>ruby
script/console
Loading development environment.

require ‘json’
=> []

exit

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>ruby
script/console
Loading development environment.

require ‘json’
=> []

JSON.parse(JSON.unparse(:stuff => “nuff”))
=> {“stuff”=>“nuff”}

exit
c:/ruby/lib/ruby/1.8/irb/workspace.rb:81: [BUG] Segmentation fault
ruby 1.8.4 (2006-04-14) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

==========================================================================
the output from my irb running json 1.0.7

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>irb
irb(main):001:0> require ‘rubygems’
=> false
irb(main):002:0> gem ‘json’
=> true
irb(main):003:0> require ‘json’
=> true
irb(main):004:0> exit

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>irb
irb(main):001:0> require ‘rubygems’
=> false
irb(main):002:0> gem ‘json’
=> true
irb(main):003:0> require ‘json’
=> true
irb(main):004:0> JSON.parse(JSON.unparse(:stuff => “nuff”))
=> {“stuff”=>“nuff”}
irb(main):005:0> exit
c:/ruby/bin/irb.bat:20: [BUG] Segmentation fault
ruby 1.8.4 (2006-04-14) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

I correct myself,
that was with json 1.0.3.

btw, I’m running this from command prompt - running it “as
administrator”

Matthew R. wrote:

==========================================================================
the output from my irb running json 1.0.7

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>irb
irb(main):001:0> require ‘rubygems’
=> false
irb(main):002:0> gem ‘json’
=> true
irb(main):003:0> require ‘json’
=> true
irb(main):004:0> exit

c:\code\RubyOnRailsApps\MidasSubscriptions\trunk\main>irb
irb(main):001:0> require ‘rubygems’
=> false
irb(main):002:0> gem ‘json’
=> true
irb(main):003:0> require ‘json’
=> true
irb(main):004:0> JSON.parse(JSON.unparse(:stuff => “nuff”))
=> {“stuff”=>“nuff”}
irb(main):005:0> exit
c:/ruby/bin/irb.bat:20: [BUG] Segmentation fault
ruby 1.8.4 (2006-04-14) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

ok I’ve managed to get it to work by using the “json_pure” gem instead.
but it’s annoying
:s