Comments (7)
Same issue but different source
used library com.sagar:coroutinespermission:2.0.1
Caused by kotlin.UninitializedPropertyAccessException: lateinit property completableDeferred has not been initialized
at com.eazypermissions.coroutinespermission.PermissionManager.onPermissionResult + 38(PermissionManager.java:38)
at com.eazypermissions.common.BasePermissionManager.onRequestPermissionsResult + 46(BasePermissionManager.java:46)
at androidx.fragment.app.FragmentActivity.onRequestPermissionsResult + 768(FragmentActivity.java:768)
at android.app.Activity.dispatchRequestPermissionsResult + 7787(Activity.java:7787)
at android.app.Activity.dispatchActivityResult + 7638(Activity.java:7638)
at android.app.ActivityThread.deliverResults + 4605(ActivityThread.java:4605)
at android.app.ActivityThread.handleSendResult + 4653(ActivityThread.java:4653)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage + 1829(ActivityThread.java:1829)
at android.os.Handler.dispatchMessage + 106(Handler.java:106)
at android.os.Looper.loop + 198(Looper.java:198)
at android.app.ActivityThread.main + 7038(ActivityThread.java:7038)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 523(RuntimeInit.java:523)
at com.android.internal.os.ZygoteInit.main + 836(ZygoteInit.java:836)
from eazypermissions.
@jvenditti @brnogz Can we have a scenario or steps that would cause this issue?
from eazypermissions.
@jvenditti @brnogz Can we have a scenario or steps that would cause this issue?
I'll try to reproduce it today, if I do, i will update this issue. My only guess is onDestroy and onPermissionResult is part of fragment and regardless usage of this library, these methods can be invoked anytime by the system. So it is very low chance but possible that lateinit property can be never initialized before one of these methods called.
from eazypermissions.
I couldn't reproduce it myself, however crash reports are still coming so I will add my own modified version of the library in my app.
from eazypermissions.
Cool, I will check it at my end and will try to reproduce.
from eazypermissions.
I think if fragment gets recreated by the system(due to memory constraints or some other reason) system will use the default constructor to initialize fragment again. A new instance won't have CompletableDeferred
initialize.
from eazypermissions.
@brnogz @jvenditti Please go through PR for this fix.
from eazypermissions.
Related Issues (14)
- Migrate to AndroidX
- Kotlin DSL support HOT 1
- README enhancements HOT 3
- Crash in requestPermissions() HOT 5
- More than one file was found with OS independent path 'META-INF/common_release.kotlin_module' HOT 1
- ERROR: Failed to resolve: com.sagar:common:2.0.2 HOT 2
- grantedPermissions on PermissionResult.PermissionGranted is required..
- Memory leak in Fragment HOT 3
- Move to MavenCentral HOT 7
- Failed to resolve: com.sagar:coroutinespermission:2.0.3 HOT 3
- Add fragments warning
- Not able to request Special Permissions like MANAGE_EXTERNAL_STORAGE
- How to install this without JCenter?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eazypermissions.