#1265 ✓resolved
Dan Kubb (dkubb)

Marshal problem with DO and Ruby 1.9.1

Reported by Dan Kubb (dkubb) | May 11th, 2010 @ 12:46 PM

Today, when testing the Property/Type refactoring I ran into an issue in Ruby 1.9.1, DO, and the Object type.

Previously values of an Object type were serialized using Marshal and base64 encoded. The base64 encoding is no longer being done, and I think it exposed a bug in DO.

To reproduce, go into dm-core edge and run the following commands:

NOTE: Make sure you have the bundler gem installed, and ruby 1.9.1p378 (or ruby-head)

  1. rake local_gemfile
  2. ADAPTER="sqlite" BUNDLE_GEMFILE="Gemfile.local" bundle install
  3. ADAPTER="sqlite" BUNDLE_GEMFILE="Gemfile.local" bundle exec spec spec/public/property/object_spec.rb

You should see a stacktrace similar to this: http://pastie.org/955692.txt

The error is "marshal data too short", which after some initial research shows that perhaps the data marshal is working on is being truncated in some way. My guess is it's an encoding problem, but I don't know for sure.

This problem is repeatable with sqlite, or postgres; but mysql does not have any problems with this code.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »