TerryCavanagh / super-hexagon-neo-issues

A repo for tracking issues related to the Super Hexagon Neo branch
6 stars 0 forks source link

[iOS] Best time being reverted #17

Open Niz8 opened 11 months ago

Niz8 commented 11 months ago

I have only noticed this on the Hexagonest stage. IMG_4720 IMG_4723 IMG_4724

iPhone 15 Pro iOS 17.1.1

LiquidDeath911 commented 9 months ago

I have been experiencing this issue as well but it happens on all levels. iOS 16.2, iPhone 14 Pro Max.

danoli3 commented 9 months ago

What times @Niz8 and @LiquidDeath911 do u have on Game Center scores?

Very strange it shouldn't ever be restoring a lower score even if game center has a registered different score though.

disparity in iOS from both reports 16.2 and 17.0 means might be a GameCenter API change.

LiquidDeath911 commented 9 months ago

Here are screenshots of in game and GameCenter B4F1638C-D6FC-4618-9195-7E9CD860EAD9 3BF0B85C-DD10-4D1D-901F-CA59119922DE AE94A481-64CC-44A6-8939-DAB81E7F4687 A7D28AEA-D2A2-4559-8061-D4EC51583418

LiquidDeath911 commented 9 months ago

If I uninstall the app and reinstall it, it will show the correct best time.

Once a new best time is achieved, the in game time will be correct until closing the app. After reopening the app, it will be reverted.

LiquidDeath911 commented 9 months ago

Here is a recording I just took. You can see my best time was 16 seconds. I beat my best time (on the second try) and got 19 seconds. I show that the time is correct on the level select screen.

After closing and reopening, the time is back at 16 seconds. I then show GameCenter still has the 19 seconds.

Niz8 commented 9 months ago

I will add I’m also experiencing at all levels. I just didn’t notice it before. Here’s Game Center score showing disparity. I think the revert occurs on force quit but it also occurs when in the background long enough for iOS to cycle RAM IMG_4949 IMG_4948

danoli3 commented 9 months ago

Confirmed problem on recent security patched iOS 16/17 (last couple of months)

Reason: Unknown - related to Read/Write i/o interaction of game save data in response to a recent last Apple Security Patch - related to Sandbox/Write/Read security it would seem. Logs suggest some sort of block happening as file is not closed.

CVE Apple Security Patch notes suggest holes in a open file in a sandboxed folder could be used to escalate privileges by exploiting open file to then write with higher chmod level, allowing of course for files to be then used to go higher. Seems the save file is caught in the crossfire with the old code for save/load.

This security fix may have inadvertently caused a read/write in the same frame to miss the write. Oddities occur as to why the save still fails to write on subsequent close/minimise action as coded. Maybe file state gets into an error state.

Work arounds: It seems currently, flags are set to write file before this read/write timing error, when any level achievement is unlocked so if Line/Square/ etc achieved where previously not, save will write correctly before this i/o issue can manifest. I can confirm that when this flag is triggered on another level, even the save is written completely. Code suggests this flag forces a different write method that successfully closes the file.

Weird bug guys! Thanks for the report

Overall: Game Center will accept the score. Highscore can restored via game center if this error occurs in the intrim.