Skip to content

Conversation

@ovitrif
Copy link
Contributor

@ovitrif ovitrif commented Nov 17, 2022

Fixes #17463

The goal of this fix is to prevent possible data loss while their content is uploaded to the server.
While we weren't able to reproduce the crash we noticed it occurs for some users when they start the app, if their internet connectivity is active and there are local changes to be synced to the server.

This fix is applied to to prevent possible IllegalStateExceptions when the mutex is already unlocked by the system during a cancellation / completion while the mutex locking function is suspended.

To test:
Nothing much to test here, verify CI checks are green.

Regression Notes

  1. Potential unintended areas of impact
    N/a

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/a

  3. What automated tests I added (or what prevented me from doing so)
    N/a

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

This fix is applied to to prevent possible `IllegalStateException`s when the mutex is already unlocked by the system during a cancellation / completion while the locking function is suspended.
@ovitrif ovitrif added this to the 21.2 ❄️ milestone Nov 17, 2022
@ovitrif ovitrif requested a review from ParaskP7 November 17, 2022 15:30
@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💯

Thank you so much for working on making this more robust @ovitrif ! 🙇 ❤️ 🥇

@ParaskP7 ParaskP7 self-assigned this Nov 17, 2022
@ovitrif
Copy link
Contributor Author

ovitrif commented Nov 17, 2022

Thank you so much for working on making this more robust @ovitrif ! 🙇 ❤️ 🥇

Many thanks for helping with the investigation and the PR review @ParaskP7 🥇 🚀

@wpmobilebot
Copy link
Contributor

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17472-749de37.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit749de37
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Contributor

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17472-749de37.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit749de37
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@ovitrif ovitrif merged commit 98a3fad into release/21.2 Nov 17, 2022
@ovitrif ovitrif deleted the issue/17463-prevent-invalid-mutex-unlock branch November 17, 2022 16:21
@AliSoftware
Copy link
Contributor

This fix has been integrated as part of the new 21.2-rc-2 beta 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CompletionHandlerException: Exception in resume onCancellation handler for CancellableContinuation(DispatchedCont

5 participants