-
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
Crash - Create Dir Paper #66
Comments
Hi, |
In many devices, Samsung, Motorola, Azus, Lenovo... We used Crashlytics to save the crashes and he returned several records for this occurrence. We use it to save when we receive a GCM notification. And the application is totally in the background. Can this occur because the context is null? |
Nope, if context is null the crash should happen earlier on getting db path. The exception is thrown at https://github.com/pilgr/Paper/blob/master/paperdb/src/main/java/io/paperdb/DbStoragePlainFile.java#L288 . For Some unknown reasons operation to create necessary dirs was not success. I'll close this issue as I don't see any way for now how to handle this situation better. |
As per #108 the issue is only in pre 4.4 devices but we are seeing same in Android 6, 7 and 8 as well.
|
I'm seeing this issue happen to many different users with different OS versions as well. |
this exeption is happening when many threads try to create new directory. it's mean, for the first time use |
fairly simple:
From java rt
Still not obvious? --- >>> `
` SO -- if 2 threads call mkdirs() 'at once' very likely one will see the directory already made, |
Very good point, thanks @DALDEI ! |
Today I was trying to save the db file in a public directory to access it from multiple apps in my Android Pie, similar error occured with this following code. Code: Error: What should I do? I tried giving my app |
@Sourav242 seems like your issue is related to the #166? |
Please review the PR with the fix #168 |
Fixed and merged to master, included in the new version 2.7.1 |
Hi,
This error started happening frequently in my application, I would like to know if there is anything I can do to prevent it from occurring.
The text was updated successfully, but these errors were encountered: