UserDefault.xml has a chance to be removed when the game crash!


#1

UserDefault.xml has a chance to be removed when the game crash!!

The chances of that happening are very low

platform: android
cocos ver:3.4


#2

when UserDefault broken, it won’t save anymore unless reinstall.
yes, its happen sometime to me too. Usually because saving forbidden character.


#3

Can you provide more info? Can you reproduce this behavior in 3.16 or GitHub master? If you can share a test case we can test this too.


#4

About 5 out of 300,000 users. Hard to reproduce. just kown that the game crash or go back to the background.

Our game has been completed and we can’t replace cocos version.


#5

It is easy to reproduce, test it in proj.win32:

UserDefault::getInstance()->setStringForKey("*/><!", "<>!@*($)@#&%");

after that, you will not be able to save / load any data, and any previous saved data will be lost.