YAML Aborting with large data set?

M

Martin Hart

Hi all,

I have a large document in yaml which I can't load or dump using YAML in ruby
because it segfaults. I have searched the archives and I wonder if this
error is similar to that described in the ruby-talk thread "Syck 0.35 +
YAML.rb 0.60 -- the 1st stable release". However in that thread I believe
that multi-threaded scripts were the main cause for concern...

This bugs out on all of my development machines:

[martin@dorfl dev]$ ruby -v
ruby 1.8.1 (2003-12-25) [i686-linux]

[martin@dorfl dev]$ irb
irb(main):001:0> require "yaml"
=> true
irb(main):002:0> string = "hello world" * 2000
=> "hello worldhello worldhello worldhello worldhello wo...... etc"
irb(main):003:0> data = string.to_yaml
/usr/local/lib/ruby/1.8/yaml/rubytypes.rb:315: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-25) [i686-linux]

Aborted
[martin@dorfl dev]$

Can somebody else confirm that this is reproducable?

As I mentioned above - the document that I want to convert to/from YAML is
large. Is there a size limitation that I am unaware of with the current yaml
implementation?

Cheers,
Martin

--
Martin Hart
Arnclan Limited
53 Union Street
Dunstable, Beds
LU6 1EX
http://www.arnclanit.com
 
T

ts

M> I have a large document in yaml which I can't load or dump using YAML in ruby
M> because it segfaults. I have searched the archives and I wonder if this
M> error is similar to that described in the ruby-talk thread "Syck 0.35 +
M> YAML.rb 0.60 -- the 1st stable release". However in that thread I believe
M> that multi-threaded scripts were the main cause for concern...

Best to use the CVS version of ruby, and see if you can reproduce the
problem.


Guy Decoux
 
M

Martin Hart

Best to use the CVS version of ruby, and see if you can reproduce the
problem.

thanks for the quick response. Indeed ruby 1.9.0 does not have this problem.

Cheers,
Martin
 
G

Gavin Sinclair

I have a large document in yaml which I can't load or dump using YAML in ruby
because it segfaults. I have searched the archives and I wonder if this
error is similar to that described in the ruby-talk thread "Syck 0.35 +
YAML.rb 0.60 -- the 1st stable release". However in that thread I believe
that multi-threaded scripts were the main cause for concern...

The code you gave worked for me

ruby 1.8.1 (2004-01-08) [i386-cygwin]

It was happy with a multiplier of 20000 as well.

Cheers,
Gavin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top