Problem deserializing large object

252 views
Skip to first unread message

Samuel Gross

unread,
Jan 13, 2015, 9:23:27 PM1/13/15
to kryo-...@googlegroups.com
Hi,

I have a large object that I can serialize and write to disk with no problem.  The file is about 1.4GB on disk.  When I try to deserialize I get the following error:

Exception in thread "main" com.esotericsoftware.kryo.KryoException: Buffer underflow.
Serialization trace:
referenceTable (com.google.cloud.genomics.denovo.ReferenceIndex)
at com.esotericsoftware.kryo.io.Input.require(Input.java:181)
at com.esotericsoftware.kryo.io.Input.readShort(Input.java:654)
at com.esotericsoftware.kryo.io.Input.readShorts(Input.java:853)
at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ShortArraySerializer.read(DefaultArraySerializers.java:150)
at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ShortArraySerializer.read(DefaultArraySerializers.java:133)
at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:730)

The class consists of three primitive arrays and a couple of hash maps.  The primitive arrays each have 200 million elements.  Is this expected (i.e., is there some size limit for Kryo) or should I file a bug?  Any ideas?

Thanks,
Sam

Nate

unread,
Jan 13, 2015, 9:34:19 PM1/13/15
to kryo-users
It seems to be trying to read more bytes than the Input (stream or buffer) can provide. There aren't size limits with Kryo. Well there is one, that it uses the stack so extremely deep object graphs may need a higher stack size. It doesn't look like your problem.

Can you make the data smaller and have it still fail?


--
You received this message because you are subscribed to the "kryo-users" group.
http://groups.google.com/group/kryo-users
---
You received this message because you are subscribed to the Google Groups "kryo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kryo-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages