Repository navigation
Fix: HybridApp iOS App Hang in MarkdownTextInput Yoga layout - #97871
staszekscp wants to merge 0 commit into
Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
@abzokhattab @situchan One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios1.movios2.moviOS: mWeb SafariMacOS: Chrome / Safari |
situchan
left a comment
There was a problem hiding this comment.
Please fix conflict and undo all unrelated changes in project.pbxproj, Podfile.lock
|
iOS dev app crashed on Ended up react-native+0.86.0+037+fix-stale-font-scale.patch caused crash |
|
Please check if this also happens in production Mention suggestions list is cut off Screen.Recording.2026-08-19.at.3.40.14.PM.mov |
Yes, it does: ScreenRecording_08-20-2026.08-36-38_1.MP4 |
|
After the |
a27163e to
c156d5f
Compare
Explanation of Change
The app froze and got killed on iOS while typing in the composer (Sentry APP-EF1).
Two threads were waiting on each other. RCTMarkdownUtils locked itself for the whole parse-and-format step, but parsing also needs the markdown runtime's own lock. So a background layout thread could hold the first lock while waiting for the second, and the main thread would sit there waiting for the first one. Yoga measure runs on the main thread, so the UI stopped responding, and after about 2 seconds iOS killed the app.
Fix:
Keep the lock only around the two variables that need it, and pass the style and parser ID in as arguments instead of reading them back. Parsing now happens outside the lock, so the two locks are never held at the same time.
The main thread no longer parses at all. It reads the cached result, and if there isn't one it kicks off a parse in the background and draws unformatted text for that single frame. Background threads still parse right away, which is fine because only the main thread has a watchdog.
Fixed Issues
$ #93831
PROPOSAL:
Tests
strike,code, > quote, # heading, a link and an @mention.Offline tests
QA Steps
strike,code, > quote, # heading, a link and an @mention.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-08-17.at.15.07.40.mov
iOS: mWeb Safari
MacOS: Chrome / Safari