Closed jbalint-de closed 2 years ago
I looked first to see if my issue was here, and this is close.
Crash when muting profile.
Tap on any user’s profile in your feed. Mute them. Keep default options, tap Mute to save.
App immediately crashes, when you open it the Mute was successful.
It shouldn’t crash.
iPhone 13 pro, iPadOS 15.7.1, Metatext 1.5.3. Bug_type is 309
I don't know the root cause for this crash, however, I was able to reproduce it sometimes and to get some insight into what happens.
The crash happens in CollectionItemsViewModel.swift
, in function viewModel(indexPath: IndexPath) -> Any
:
public func viewModel(indexPath: IndexPath) -> Any {
let item = lastUpdate.sections[indexPath.section].items[indexPath.item] // <-- items is empty, ergo: array index out of bounds for index 0
let cachedViewModel = viewModelCache[item]
// ...
}
I notices that when muting a profile from the profile page (and the app doesn't crash for once), none of the account's toots are shown anymore (the profile is shown, but without any posts). They only become visible again when refreshed by pulling down. This might have to do with the error, perhaps because some cache is invalidated (?) or so.
Description: App crashes when muting a profile you follow
Steps to reproduce the behavior:
Expected behavior: App shouldn't crash.