Skip to content
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 by fetching a preference #27

Closed
ESinyak opened this issue Sep 29, 2017 · 1 comment
Closed

Crash by fetching a preference #27

ESinyak opened this issue Sep 29, 2017 · 1 comment
Assignees
Labels

Comments

@ESinyak
Copy link

ESinyak commented Sep 29, 2017

I found the following crash in the Crashlytics. Can't reproduce on my test devices. I use 0.9.9 version. Can update to 1.0.0-BETA-2 possibly solve it?

Do you have any ideas why it may happen?

Fatal Exception: java.lang.RuntimeException: Unable to create application: com.ironz.binaryprefs.exception.FileOperationException: java.util.concurrent.ExecutionException: com.ironz.binaryprefs.exception.LockOperationException: java.io.FileNotFoundException: /data/data/example.android.com/cache/preferences/debug_pref/lock/debug_pref.lock: open failed: ENOENT (No such file or directory)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4881)
at android.app.ActivityThread.access$1400(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1537)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5660)
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:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by com.ironz.binaryprefs.exception.FileOperationException: java.util.concurrent.ExecutionException: com.ironz.binaryprefs.exception.LockOperationException: java.io.FileNotFoundException: /data/data/example.android.com/cache/preferences/debug_pref/lock/debug_pref.lock: open failed: ENOENT (No such file or directory)
at com.ironz.binaryprefs.task.Completable.completeBlockingUnsafe(Completable.java:44)
at com.ironz.binaryprefs.BinaryPreferences.fetchCache(BinaryPreferences.java:64)
at com.ironz.binaryprefs.BinaryPreferences.(BinaryPreferences.java)
at com.ironz.binaryprefs.BinaryPreferencesBuilder.build(BinaryPreferencesBuilder.java:88)
****************************
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4872)
at android.app.ActivityThread.access$1400(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1537)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5660)
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:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by java.util.concurrent.ExecutionException: com.ironz.binaryprefs.exception.LockOperationException: java.io.FileNotFoundException: /data/data/example.android.com/cache/preferences/debug_pref/lock/debug_pref.lock: open failed: ENOENT (No such file or directory)
at java.util.concurrent.FutureTask.report(FutureTask.java:93)
at java.util.concurrent.FutureTask.get(FutureTask.java:163)
at com.ironz.binaryprefs.task.Completable.completeBlockingUnsafe(Completable.java:42)
at com.ironz.binaryprefs.BinaryPreferences.fetchCache(BinaryPreferences.java:64)
at com.ironz.binaryprefs.BinaryPreferences.(BinaryPreferences.java)
at com.ironz.binaryprefs.BinaryPreferencesBuilder.build(BinaryPreferencesBuilder.java:88)
****************************
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4872)
at android.app.ActivityThread.access$1400(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1537)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5660)
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:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by com.ironz.binaryprefs.exception.LockOperationException: java.io.FileNotFoundException: /data/data/example.android.com/cache/preferences/debug_pref/lock/debug_pref.lock: open failed: ENOENT (No such file or directory)
at com.ironz.binaryprefs.lock.ProcessFileLock.lock(ProcessFileLock.java:43)
at com.ironz.binaryprefs.file.transaction.MultiProcessTransactionImpl.fetch(MultiProcessTransactionImpl.java:24)
at com.ironz.binaryprefs.BinaryPreferences$1.run(BinaryPreferences.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by java.io.FileNotFoundException: /data/data/example.android.com/cache/preferences/debug_pref/lock/debug_pref.lock: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.RandomAccessFile.(RandomAccessFile.java)
at com.ironz.binaryprefs.lock.ProcessFileLock.lock(ProcessFileLock.java:30)
at com.ironz.binaryprefs.file.transaction.MultiProcessTransactionImpl.fetch(MultiProcessTransactionImpl.java:24)
at com.ironz.binaryprefs.BinaryPreferences$1.run(BinaryPreferences.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Posix.java)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:482)
at java.io.RandomAccessFile.(RandomAccessFile.java)
at com.ironz.binaryprefs.lock.ProcessFileLock.lock(ProcessFileLock.java:30)
at com.ironz.binaryprefs.file.transaction.MultiProcessTransactionImpl.fetch(MultiProcessTransactionImpl.java:24)
at com.ironz.binaryprefs.BinaryPreferences$1.run(BinaryPreferences.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

@iamironz
Copy link
Contributor

iamironz commented Sep 30, 2017

Hi!
Thanks for issue submitting.

Can update to 1.0.0-BETA-2 possibly solve it?

Yes, this kind of problem has been solved in 1.0.0 beta 2.
Please, upgrade your dependency.
Also note what 0.9.9 and 1.0.0 beta's is not backwards compatible if you use built-in key and value encryption.

Regards,
Alexander

@iamironz iamironz self-assigned this Sep 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants