EsotericSoftware / kryo

Java binary serialization and cloning: fast, efficient, automatic
BSD 3-Clause "New" or "Revised" License
6.19k stars 823 forks source link

NPE while de-serializing an ArrayList #858

Closed geekthread closed 2 years ago

geekthread commented 3 years ago

Describe the bug We are getting NPE while we are trying to de-serialize an arraylist { "java.lang.NullPointerException" : ["ArrayList.java",1240,"java.util.ArrayList$SubList.checkForComodification", "ArrayList.java",1050,"java.util.ArrayList$SubList.size", "AbstractList.java",108,"java.util.AbstractList.add", "CollectionSerializer.java",134,"com.esotericsoftware.kryo.serializers.CollectionSerializer.read", "CollectionSerializer.java",40,"com.esotericsoftware.kryo.serializers.CollectionSerializer.read", "Kryo.java",787,"com.esotericsoftware.kryo.Kryo.readClassAndObject", "ObjectSerializerKryoImpl.java",81,"hidden.object.serializer.impl.ObjectSerializerKryoImpl.lambda$deserialize$1", "ObjectSerializerPool.java",99,"hidden.object.serializer.impl.ObjectSerializerPool.run", "ObjectSerializerKryoImpl.java",81,"hidden.object.serializer.impl.ObjectSerializerKryoImpl.deserialize"]}}} }

We were able to serialize the same object but during de-serialization we are getting this exception.

Environment:

theigl commented 3 years ago

@geekthread: Kryo 3 is 6 years old and not maintained anymore. If you can, please move to Kryo 5.