Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race issue leading to dialog not dismissed #1

Closed
bubbleguuum opened this issue May 8, 2014 · 3 comments
Closed

Race issue leading to dialog not dismissed #1

bubbleguuum opened this issue May 8, 2014 · 3 comments
Assignees
Milestone

Comments

@bubbleguuum
Copy link

I found a race timing dependent issue where the dialog is not dismissed in some cases, when the dialog it dismissed shortly after it has been shown.

  • ContentLoadingProgressDialog.dismiss() is called
  • it fires mDelayedHide
  • onAttachedToWindow() is called before mDelayedHide executes, and remove the callback
  • as a consequence, the callback is not called and the dialog not dismissed

Although I could reprod it easily, it might be difficult to reproduce on a particular phone / Android version as it is really timing dependent.
Raising minShowTime to 1000 or higher seems to fix it.
It can also possibly fixed by modifying onAttachedToWindow() to not remove the callback if the dislog is in the process of being dismissed (not sure this is the correct fix though)

@tasomaniac
Copy link
Owner

Can you reproduce it everytime? What does happen in the case you wrote?
Does it flash?

@bubbleguuum
Copy link
Author

It doesn't flash: the dialog is simply not dismissed because ProgressDialog.dismiss() is not called.

As I mentionned in the OP, it happens when onAttachedToWindow() is called before mDelayedHide runs.

@arthurprs
Copy link

Confirmed. Sometimes my dialogs are not dismissed. Do we have a workaround besides increasing the minShowTime?

@tasomaniac tasomaniac self-assigned this Jul 9, 2015
@tasomaniac tasomaniac added this to the Version 0.2 milestone Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants