rileytestut / Delta

Delta is an all-in-one classic video game emulator for non-jailbroken iOS devices.
4.53k stars 334 forks source link

Attempting to remove recently played game from shortcuts crashes #302

Open john-cabaj opened 1 month ago

john-cabaj commented 1 month ago

When attempting to remove a game from the recently played games shortcuts, the all crashes. It’s very reproducible.

iPhone 14 Pro. Delta 1.5.1

imticho commented 1 month ago

Yeah, i tried it out and it happens to me too, i think i know where its at so I'l try to take a crack at it

john-cabaj commented 1 month ago

It probably makes sense to not even be able to modify the recently played games list. Keep the top n and that's what you've played recently. If you elect not to use recently played games, then the last can add and remove as you see fit.

imticho commented 1 month ago

@rileytestut , what's the functionality of this line of code?

Screenshot 2024-04-26 at 1 56 37 AM

It seems that this specific line is causing the crash when removing a shortcut, from what I understand, it treats this update almost like an insertion but doesn't actually treat it as an insertion, causing a NSInternalInconsistencyException. Removing the line seems to make the removing and adding shortcuts feature work fine, but I'm not sure if there are any other dependencies in this line.