the-blue-alliance / the-blue-alliance-ios

An iOS app for accessing information about the FIRST Robotics Competition.
MIT License
77 stars 23 forks source link

Event team page sometimes crashing when updating #931

Closed mfrancis33 closed 2 years ago

mfrancis33 commented 2 years ago

Describe the bug Looking at a team's summary in an event having the app update the page will crash the app sometimes. Behavior has been inconsistent.

To Reproduce Steps to reproduce the behavior:

  1. Go to a team
  2. Click on one of their events. This will take you to their summary page for the event
  3. If it doesn't crash immediately, which it has sometimes done, swipe up to force a page update.
  4. It might not crash, behavior has been variable for me.

Expected behavior I expected the app to update the page and not crash

Screenshots I don't know how to screenshot the app suddenly closing

Your Environment (please complete the following information):

Additional context The crash is variable. Sometimes it crashes when I open the summary page, sometimes I have to swipe up. Sometimes it doesn't crash at all.

ZachOrr commented 2 years ago

Introduced when compiling against iOS 15 with the diffable data source in the Team@Event view - looks like it's an issue with the record row

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Diffable data source detected item identifiers that are equal but have different hash values. Two identifiers which compare as equal must return the same hash value. You must fix this in the Hashable (Swift) or hash property (Objective-C) implementation for the type of these identifiers. Identifiers that are equal but have different hash values: (The_Blue_Alliance.(unknown context at $1027e3970).TeamSummaryItem.record(wlt: <WLT: 0x283af9d40>, dqs: Optional(0))) and (The_Blue_Alliance.(unknown context at $1027e3970).TeamSummaryItem.record(wlt: <WLT: 0x283bf5880>, dqs: Optional(0)))'