Giter Club home page Giter Club logo

Comments (5)

Noitidart avatar Noitidart commented on June 3, 2024

Super issue topic. Thank you!! This is definitely something to fix.

from react-native-dialogs.

varungupta85 avatar varungupta85 commented on June 3, 2024

I was finally able to find the bug behind this problem. I can't exactly explain the problem but it happens when we dismiss the dialog before showing and user has closed the app. I that case, the WindowManager is not in the right state. To fix this, I have to listen to lifecycle events by having the module implement LifecycleEventListener and dismiss the dialog in onHostDestroy. I am using my own fork with extensive changes due to which I am not able to send a PR but it might help someone else running into similar problem.

from react-native-dialogs.

Noitidart avatar Noitidart commented on June 3, 2024

I really appreciate your patient and persistant troubleshooting. When you posted there was a problem I strongly wanted to fix but I could not find out how. So the scenario described here is similar to the one described here - #94 (comment)

But its at the "dismiss level". So the scenario is same as one described above - where i call show from js, its taking 1hour to show, and in this time i hit the back button which triggers dismiss but it has not yet been shown so crash happens. Is this correct? So it never gets to the show method. So we need to detect or catch in the dismiss that it is not yet shown and throw correct?

from react-native-dialogs.

varungupta85 avatar varungupta85 commented on June 3, 2024

That's what I also tried initially which is to catch the exception in dismiss and it fixed the issue and I was not seeing any abort. But since the mDialog is not null "somehow", I got a warning that we leaked a window similar to explained here https://stackoverflow.com/questions/2850573/activity-has-leaked-window-that-was-originally-added. They suggested to listen on the lifecycle events and dismiss the dialog when the activity is stopped. After doing that, the abort was fixed and I was not seeing any leaked window warning either.

from react-native-dialogs.

EmilScherdin avatar EmilScherdin commented on June 3, 2024

Hi! I'm experiencing this as well. When pressing on the backdrop of the picker it always crashes. Is there a workaround for this that I'm missing?

from react-native-dialogs.

Related Issues (20)

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.