Comments (5)
Super issue topic. Thank you!! This is definitely something to fix.
from react-native-dialogs.
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.
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.
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.
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)
- Is this repo still maintained? HOT 4
- Crash when using showPicker with RN 0.57.4 HOT 2
- DialogAndroid.prompt set OptionsCommon' content not working on Android HOT 2
- 1.0.3 HOT 3
- Android resource linking failed on RN 0.58 HOT 6
- Duplicate type OptionsCheckbox HOT 2
- TypeError: null is not an object (evaluating '_reactNative.NativeModules.DialogAndroid.show' HOT 9
- [Feature] Would be nice showPicker method supports icons like the native HOT 4
- [Bug, Android] The input of a prompt is hidden partially HOT 1
- Is this compatible with React Native 0.60? HOT 2
- prettier config is missing HOT 2
- Custom font for Dialog HOT 2
- Typescript definition
- show left positiveTex
- Content property does not accept external component
- Fails to build on react-native 0.73
- Validation?, how? HOT 1
- Not building production with 0.57.1 HOT 9
- Turn off autocorrect on prompts HOT 3
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 react-native-dialogs.