davidsansome / tsurukame

Tsurukame is an unofficial WaniKani app for iOS. It helps you learn Japanese Kanji.
https://tsurukame.app
Apache License 2.0
249 stars 58 forks source link

TestFlight crash when opening recent mistakes review #688

Closed Deadpikle closed 3 months ago

Deadpikle commented 6 months ago

My app crashed when I opened up the Recent Mistakes review queue from the main menu, I believe while the app was syncing. I could not replicate the crash and have not experienced it since that time.

I submitted the crash report via TestFlight. Is there any chance that the submitted crash reports for recent TestFlight builds could be checked and posted here? I'd be happy to fix the issue if it's related to the features I've added recently. It's probably something simple. At least, one can always hope.

Motifier commented 5 months ago

I've had the same thing happen to me and it keeps happening when i reopen the app. I've exported the local database if that would be off any use?

Deadpikle commented 3 months ago

This happens because LocalCachingClient.getAllRecentMistakeAssignments is unexpectedly finding nil in the line: ret.append(cursor.proto(forColumnIndex: 0)!). When assignments are deleted but before they are synced again, a.pb is nil, so this function throws an error and the app crashes until it syncs properly.

See #678 for a related discussion.