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.35k stars 234 forks source link

Caused by: java.io.FileNotFoundException: /data/user/0/xxx/files/io.float/INT_SOUND_FEEDBACK_VOLUME.pt (Too many open files) #124

Closed ksxkq closed 4 years ago

ksxkq commented 6 years ago

I don't know how this happened, and I can't reproduce this problem. I see this exception in crash statistics. Android 7.0, 8.0 and different brand This exception is not a lot, but aways appears. paper version is v2.6. I google this exception,but find no answer.

io.paperdb.PaperDbException: Couldn't read/deserialize file /data/user/0/xxx/files/io.float/INT_SOUND_FEEDBACK_VOLUME.pt for table INT_SOUND_FEEDBACK_VOLUME at io.paperdb.DbStoragePlainFile.readTableFile(DbStoragePlainFile.java:298) at io.paperdb.DbStoragePlainFile.select(DbStoragePlainFile.java:158) at io.paperdb.Book.read(Book.java:73) at xxx.c.c.b(PaperDao.java:44) at xxx.c.e.O(SpUtils.java:275) at xxx.c.b(FeedbackManger.java:33) at xxx.e.b.b.a(SimpleGestureOnTouchListener.java:358) at xxx.e.b.b.b(SimpleGestureOnTouchListener.java:334) at xxx.e.b.b.a(SimpleGestureOnTouchListener.java:299) at com.xxx.e.b.a$a.onSingleTapConfirmed(GestureOnTouchListenerBase.java:572) at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:301) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:159) at android.app.ActivityThread.main(ActivityThread.java:6363) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1096) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:883) Caused by: java.io.FileNotFoundException: /data/user/0/xxx/files/io.float/INT_SOUND_FEEDBACK_VOLUME.pt (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:146) at io.paperdb.DbStoragePlainFile.readContent(DbStoragePlainFile.java:303) at io.paperdb.DbStoragePlainFile.readTableFile(DbStoragePlainFile.java:285) ... 16 more

xxx is my packageName Can you give me some advice to solve this problem?

tsdking commented 5 years ago

I have this problem too,do you have solved?

pilgr commented 4 years ago

Looks like there is some issues on system level, it's not directly related to paper but rather to a file system state on the given device.

Prashanth-K-S commented 4 years ago

I was also facing the same issue. I was storing URI in the model class. After adding transient to the URI parameter it resolved my problem.