You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/10 13:15:12 UTC

[GitHub] [cordova-plugin-dialogs] goffioul opened a new issue, #160: Race condition with activityStart/activityStop can leave dialog on screen [Android]

goffioul opened a new issue, #160:
URL: https://github.com/apache/cordova-plugin-dialogs/issues/160

   # Bug Report
   
   ## Problem
   There is a potential race condition problem in `activityStart`/`activityStop`, because the former shows the spinner dialog in the UI thread, while the latter hides the spinner dialog in the JS thread. So it is possible for `activityStop` to try to hide the spinner dialog, while it hasn't event been shown yet, if `activityStop` is executed immediately (or shortly) after `activityStart`.
   
   For instance, using the following code (e.g. in Chrome remote debugging console):
   ```
   navigator.notification.activityStart('', 'Wait...'); navigator.notification.activityStop()
   ```
   
   ### What is expected to happen?
   `activityStop` should always discard a spinner dialog initiated by `activityStart`.
   
   
   ### What does actually happen?
   `activityStop` has no effect, because the spinner dialog hasn't been created yet by `activityStart` (due to execution in UI thread).
   
   
   ### Environment, Platform, Device
   Android
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   - cordova-android@10
   - cordova-plugin-dialogs@2.0.2
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org