mastodon / mastodon-ios

Official iOS app for Mastodon
https://app.joinmastodon.org/ios
GNU General Public License v3.0
2.09k stars 269 forks source link

[BUG] Crash before maximum toot lenght is reached #1345

Open likethegoddess opened 1 month ago

likethegoddess commented 1 month ago

Is there an existing issue for this?

Current Behavior

Note: This issue only appears when the display is set to larger text.

When creating a new post, I can only type a few lines of text before the app freezes entirely.

IMG_3603

Expected Behavior

I expect to be able to type up to the character limit.

Steps To Reproduce

1) Go to Settings > Display & Brightness > Display, and set Display Zoom to Larger Text 2) Launch app and start creating a post

Environment

- Device:iPhone 15
- OS: iOS
- Version: 17.6.1
- Build:

Anything else?

No response

christianbilodeau commented 1 month ago

👋 I had a look at this one by curiosity, there are some logged errors when this screen is shown: Attempted to access the table view's visibleCells while they were in the process of being updated, which is not allowed.

Maybe this will help someone: there is a block responsible for updating the cell height when the viewmodel contentCellFrame changes. It's accessing the TV visibleCells here. If the block is commented out, the error log disappears and the app doesn't freeze. I'm not sure about the purpose of the cell height update, I couldn't notice the behavior on my phone 🤔

christianbilodeau commented 1 month ago

It's the same problem as this one. See this reply for what I'm referring to in my previous comment.