fons / cl-mongo

lisp interface to mongo db
fons.github.com/cl-mongo
MIT License
143 stars 31 forks source link

error fetching empty array #1

Closed quasi closed 13 years ago

quasi commented 13 years ago

Invalid start (151) and end (150) values for vector of length 358. type of errors

Backtrace: 0: (BABEL::CHECK-VECTOR-BOUNDS #(102 1 0 0 105 31 ...) 151 150) 1: (BABEL:OCTETS-TO-STRING #(102 1 0 0 105 31 ...))[:EXTERNAL] 2: (CL-MONGO::BSON-DECODE 150 146 1 #(102 1 0 0 105 31 ...))[:EXTERNAL] 3: (CL-MONGO::BSON-DECODE 358 36 1 #(102 1 0 0 105 31 ...))[:EXTERNAL] 4: (CL-MONGO::MONGO-REPLY #(102 1 0 0 105 31 ...))

fons commented 13 years ago

I"ll try to reproduce this. You basically loaded an empty array, and then tried to read it back. Is that what happened ?

quasi commented 13 years ago

add element so an array in an document remove elements till array is empty then fetching the document which contains that array throws an error

to circumvent the current issue I am checking for last element of array before removing it .. and then after removing it I am unsetting the array element.

fons commented 13 years ago

I see. thanks for the info. I 'll look at this in the next few days

Sent from my iPhone

On Apr 11, 2011, at 1:52, quasireply@reply.github.com wrote:

add element so an array in an document remove elements till array is empty then fetching the document which contains that array throws an error

to circumvent the current issue I am checking for last element of array before removing it .. and then after removing it I am unsetting the array element.

Reply to this email directly or view it on GitHub: https://github.com/fons/cl-mongo/issues/1#comment_982279

quasi commented 13 years ago

any solution ?

fons commented 13 years ago

not yet

archimag commented 13 years ago

quasi, I'm working on another implementation of the driver - https://github.com/archimag/mongo-cl-driver. I think that there should not be such problems.

quasi commented 13 years ago

archimag : thanks. will look at it.

fons commented 13 years ago

this should be fixed