-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KryoException: Buffer underflow #4
Comments
Looks like happens only once per affected user. All further data read attempts are successful. |
@pilgr Hi, I was using this library as an experiment in one of my projects. But I am having this issue every time I tried to retrieve an object for the first time. It is a specific object only. |
@raviteja06 Is it 100% reproducible in your case? Could you write a unit test to reproduce it? |
@pilgr I guess it's mostly because of different things I added in the development process. I cleared the cache and tried it, Never got that again. |
I got this too on 0.1% of the sessions. I have never been able to reproduce on one of my devices so far but it is a significant cause of crashes. Also most of these crashes happen at startup which is not good. |
Could it be linked to EsotericSoftware/kryo#128 ? In all cases, can you put a section about Thread Safety in the README.md ? I understand it's ok to call Paper.book().read/write() from multiple threads, am I correct ? |
@martinbonnin yes, you can call |
@pilgr I'm also seeing this crash on a client's app, which uses paperdb v1.1:
We're also seeing it in a very small number of crashes per session, but according to Crashlytics the number of crashes is greater than the number of users impacted (each affected user has seen the crash 1.3x on average). Crashlytics device insights indicate that the crash has only been seen on HTC and OnePlus devices running Android 6.0 or 6.0.1. Does that correspond with what you're seeing with AppDialer? |
I face this error too: device: Mi 2
|
I am facing this error when .pt file show 0 bytes |
I have updated the latest version of 2.6. While crash occurring on the latest version also. Caused by io.paperdb.PaperDbException: Couldn't read/deserialize file /data/user/0/xxx.xx.xxxxxxxxx/files/mallow/TableName.pt for table TableName.pt Caused by com.esotericsoftware.kryo.KryoException: Buffer underflow. |
same here as @Manikandan92 |
I can reproduce the problem 100% of the times. |
We went in production recently (3 days ago) and we just registered two episodes: both for the same user. Still no idea about what can cause it? |
This issue is still present in version 2.7.1. It is rare and not immediately reproducible like 2.6 but it still happens. Please catch the exception within Paper. The crash occurs within our SDK at this read line.
|
Hello @pilgr, do you have any intention of fixing or catching this issue within Paper? |
@brandonpage since this is incredibly rare and hardly to be reproduced, I'm not sure how to fix it. We may add some workarounds like second read attempts though. I'm wondering how often does it happen comparing to the total number of the user sessions? |
@pilgr This buffer underflow crash is also happening in our app as we are using SalesforceMobileSDK, which use version 2.7.1 of paper db. |
@rufuszhu my understanding is if issue happens all the time for particular user, that might be caused by app update which used new package name for the class holding data. Please check out this message mentioned above.
If the class has been stored with one package name and then on read the different class is expected (even if only package name has been changed) that may cause the issue. For the same exception which happens very rarely I assume some other root cause takes place, that is still unknown. |
=> error: pilgr#4 They said it was fixed in paperdb 2.7.2, but not really! fix: pilgr#194 (upgrade kryo) => why (kryo.setRegistrationRequired(false);) EsotericSoftware/kryo#398 (comment)
Very rarely crash happening in AppDialer app using Paper, affects only 0,05% sessions.
The text was updated successfully, but these errors were encountered: