pilgr / Paper

Paper is a fast NoSQL-like storage for Java/Kotlin objects on Android with automatic schema migration support.
Apache License 2.0
2.34k stars 234 forks source link

kryo.KryoException: Buffer underflow. #151

Closed naeemgul90 closed 4 years ago

naeemgul90 commented 5 years ago

Hi, The issue is still occuring in version 2.6.

Caused by com.esotericsoftware.kryo.KryoException: com.esotericsoftware.kryo.KryoException: Buffer underflow. Serialization trace: color (com.package.YoutubeArtistsData) mContent (io.paperdb.PaperTable) at com.esotericsoftware.kryo.serializers.ObjectField$ObjectIntField.read(ObjectField.java:201) at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:145) at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:816) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:734) at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:543) at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:712) at io.paperdb.DbStoragePlainFile.readContent(DbStoragePlainFile.java:307) at io.paperdb.DbStoragePlainFile.readTableFile(DbStoragePlainFile.java:291) at io.paperdb.DbStoragePlainFile.select(DbStoragePlainFile.java:158) at io.paperdb.Book.read(Book.java:73) at com.package..MusicApplication$Companion.fetchYouTubeArtistsData(MusicApplication.java:492) at com.package.MusicApplication$Companion.fetchYouTubeData(MusicApplication.java:501) at com.package.MusicApplication$Companion.fetchInformationFromAws(MusicApplication.java:461) at com.package.MusicApplication.onCreate(MusicApplication.java:174) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4701) at android.app.ActivityThread.access$1500(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1410) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5431) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)

aznj commented 5 years ago

any update on this?

ahorobets commented 5 years ago

@aznj the same problem.. unfortunately seems like project is not supported anymore, so i'm going to get rid off this solution in production

naeemgul90 commented 5 years ago

@ArtemGorobets Have you found any good replacement yet?

pilgr commented 5 years ago

@aznj how often do you see this issue? Can you reproduce it?

ahorobets commented 5 years ago

@pilgr i've got 29 crash reports during last 90 days. approximately 5-6k user sessions per day

pilgr commented 5 years ago

@ArtemGorobets do you mean 28 crash reports along of 450000 (5000*90) sessions?

ahorobets commented 5 years ago

@pilgr yep. it's main crash producer in my app

pilgr commented 5 years ago

Unfortunately the root cause of this issue is hard to catch, especially since it happens only within ~.006% sessions like in your case. I assume the problem is with reading data on lower level which causes invalid data to parse by Kryo. But that's just assumption.

naeemgul90 commented 5 years ago

Around 150 unique users have got this issue in last 7 days. I have around 10k daily active users. I know some of the users are having this issue. But it still hurts.

naeemgul90 commented 5 years ago

This library is a real gem, it is so simple to use. I am hoping that it will be used in thousand of apps in the future. But the library needs to fixed the issues regularly.

Manikandan92 commented 5 years ago

@pilgr same problem occurring on my project also FYI

Caused by com.esotericsoftware.kryo.KryoException: com.esotericsoftware.kryo.KryoException: Buffer underflow. Serialization trace: odometer (xx.xxxxx.xxx.ClassNameReport) inspection (xx.xx.xxx.ClassNameLogs) mContent (io.paperdb.PaperTable) at com.esotericsoftware.kryo.serializers.ObjectField$ObjectDoubleField.read + 487(ObjectField.java:487) at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read + 145(CompatibleFieldSerializer.java:145) at com.esotericsoftware.kryo.Kryo.readClassAndObject + 816(Kryo.java:816) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read + 134(CollectionSerializer.java:134) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read + 40(CollectionSerializer.java:40) at com.esotericsoftware.kryo.Kryo.readObject + 734(Kryo.java:734) at com.esotericsoftware.kryo.serializers.ObjectField.read + 125(ObjectField.java:125) at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read + 145(CompatibleFieldSerializer.java:145) at com.esotericsoftware.kryo.Kryo.readClassAndObject + 816(Kryo.java:816) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read + 134(CollectionSerializer.java:134) at com.esotericsoftware.kryo.serializers.CollectionSerializer.read + 40(CollectionSerializer.java:40) at com.esotericsoftware.kryo.Kryo.readObject + 734(Kryo.java:734) at com.esotericsoftware.kryo.serializers.ObjectField.read + 125(ObjectField.java:125) at com.esotericsoftware.kryo.serializers.FieldSerializer.read + 543(FieldSerializer.java:543) at com.esotericsoftware.kryo.Kryo.readObject + 712(Kryo.java:712) at io.paperdb.DbStoragePlainFile.readContent + 307(DbStoragePlainFile.java:307) at io.paperdb.DbStoragePlainFile.readTableFile + 291(DbStoragePlainFile.java:291) at io.paperdb.DbStoragePlainFile.select + 158(DbStoragePlainFile.java:158) at io.paperdb.Book.read + 73(Book.java:73) at xx.xx.xx.ClasNameBypaperDatabase.PaperDB.getUserDetails + 299(PaperDB.java:299) at xx.xx.xx.ClassName.sampleMethod() + 283(ClassName.java:283) at xx.xx.xx.ClassName.lambda$processFleetOpsResponse$0 + 205(ClassName.java:205) at com.fr.fleetrover.eld.-$$Lambda$FRFleetOpsAPI$U4Ep8p7lxky3OLfmLCaeTS8xHXc.run(lambda) at java.lang.Thread.run + 818(Thread.java:818)

Please check it and let me know..!

lohrasbi71 commented 4 years ago

same issue for me

pilgr commented 4 years ago

duplicates #4