Giter VIP home page Giter VIP logo

Comments (7)

brnogz avatar brnogz commented on May 29, 2024

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.

sagar-viradiya avatar sagar-viradiya commented on May 29, 2024

@jvenditti @brnogz Can we have a scenario or steps that would cause this issue?

from eazypermissions.

brnogz avatar brnogz commented on May 29, 2024

@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.

brnogz avatar brnogz commented on May 29, 2024

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.

sagar-viradiya avatar sagar-viradiya commented on May 29, 2024

Cool, I will check it at my end and will try to reproduce.

from eazypermissions.

sagar-viradiya avatar sagar-viradiya commented on May 29, 2024

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.

sagar-viradiya avatar sagar-viradiya commented on May 29, 2024

@brnogz @jvenditti Please go through PR for this fix.

from eazypermissions.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.