#65 new
Yurii Rashkovskii

Weird Meta#find bug with new views

Reported by Yurii Rashkovskii | June 8th, 2008 @ 09:21 AM

StrokeDB 0.0.2.2 (help! for more info)
User = Meta.new
    # ==> User
User.create! :login => "yrashk"
    # ==> #<User login: "yrashk", uuid: "934ead51-ee6d-4108-ae8e-a5286c71fdf9", version: 0000...>
User.find
ArgumentError: marshal data too short
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/util/serialization.rb:38:in `load'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/util/serialization.rb:38:in `deserialize'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/stores/file_storage.rb:24:in `find'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/stores/memory_storage.rb:16:in `find'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/store.rb:21:in `find'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:78:in `document'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:279:in `make_document'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:251:in `document'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:249:in `map'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:249:in `document'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:208:in `find'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:208:in `map'
	from /Users/yrashk/Development/idbns/strokedb/lib/strokedb/document/meta.rb:208:in `find'
	from (irb):3
User.find
    # ==> [#<User login: "yrashk", uuid: "934ead51-ee6d-4108-ae8e-a5286c71fdf9", version: 0000...>]
User.find
    # ==> [#<User login: "yrashk", uuid: "934ead51-ee6d-4108-ae8e-a5286c71fdf9", version: 0000...>]

Comments and changes to this ticket

  • Sean Ouimet

    Sean Ouimet June 19th, 2008 @ 03:17 AM

    I find this problem crops up more 'reliably' after having closed/open the console again to access a previously initiated database. I tend not to see it (except through heavy read/write attempts) on the first session.

    The above error interchanges with:

    NoMethodError: undefined method `each' for 1:Fixnum
    	from /Users/sean/rails/strokedb/lib/strokedb/document.rb:675:in `initialize_raw_slots'
    	from /Users/sean/rails/strokedb/lib/strokedb/document.rb:637:in `do_initialize'
    	from /Users/sean/rails/strokedb/lib/strokedb/document.rb:195:in `initialize'
    	from /Users/sean/rails/strokedb/lib/strokedb/document.rb:344:in `new'
    	from /Users/sean/rails/strokedb/lib/strokedb/document.rb:344:in `from_raw'
    	from /Users/sean/rails/strokedb/lib/strokedb/stores/file_storage.rb:26:in `find'
    	from /Users/sean/rails/strokedb/lib/strokedb/stores/memory_storage.rb:16:in `find'
    	from /Users/sean/rails/strokedb/lib/strokedb/store.rb:21:in `find'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:78:in `document'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:279:in `make_document'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:251:in `document'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:249:in `map'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:249:in `document'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:208:in `find'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:208:in `map'
    	from /Users/sean/rails/strokedb/lib/strokedb/document/meta.rb:208:in `find'
    	from (irb):5>> 
    

    Where the "1" (fixed number) tends to be anything from 1..30

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 ยป

StrokeDB is an embeddable distributed document database written in Ruby

Shared Ticket Bins