Closed SiobhyB closed 5 months ago
@khaykov, 👋 , I wanted to give you a heads up on this PR as I know Day One uses Aztec for the Android app. Can you take a look to let me know if you spot anything that might cause issues for you? We're hoping to merge this fix in time for a beta in the next day or so.
@khaykov, I'm going to go ahead to merge this PR, so we can get it ready for an upcoming beta. Please let me know if there's anything that stands out to you as off, though! I think the changes are fairly safe, but thought it was best to make you aware of them regardless.
A potential fix for the crash described at https://github.com/wordpress-mobile/WordPress-Android/issues/18657.
Related PRs
Gutenberg
: https://github.com/WordPress/gutenberg/pull/56757Gutenberg Mobile
: https://github.com/wordpress-mobile/gutenberg-mobile/pull/6435Android
: https://github.com/wordpress-mobile/WordPress-Android/pull/19724Description
Sentry has been reporting the following crash for both the WordPress and Jetpack Android apps:
The stack trace for each individual event specifically references one of the following lines (the specific line varies for each event), all of which are within the
chooseHeight
function and include a reference topreviousFontMetrics
:As described at https://github.com/wordpress-mobile/WordPress-Android/issues/18657#issuecomment-1835995579, it has proven difficult to reproduce this crash. It's suspected that there are specific instances with lower performing devices or devices on poor connections that can lead to
previousFontMetrics
being set as null elsewhere in the code whilechooseHeight
is running.Given the difficulty reproducing, it hasn't been possible to get to the heart of this issue. Instead, with this PR, the previous non-null assertions previously used with
previousFontMetrics
have been replaced with safe calls. With this approach, the functionality should remain the same, while guarding againstNullPointerException
crashes.Test
Verify Aztec demo continues to function as expected
Verify Gutenberg continues to function as expected