Possible Cache Bug?

More
5 years 3 months ago #3406 by Stiv
Possible Cache Bug? was created by Stiv
Hi,

I’ve encountered a weird bug and I’m not sure what to do. I’m currently updating an old project to Unity 2017.4.11f1 and the latest version of I2 Localization (2.8.10 f1). During the update I have changed one of the terms in my language source (updated via csv import if that matters). The changes to the language source are working, and if I close and open unity they remain so I’m confident that part is correct.

The bug is that when I launch my app and change to a different language, it will show the old, outdated translation. If I close the app and launch it again, it will show the correct updated translation. But if I change languages again to one I haven’t seen before, it will again show the outdated translation for that language until I restart the app.

Once the new translation has been shown I don’t think it ever goes back to the old one, but I don’t understand how the app has both the old and the new translations? Is it cached somewhere? If it is, is there a way to clear it so I can be sure only the new translation will ever be shown?

Any help would be greatly appreciated.

Thanks!

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #3411 by Frank
Replied by Frank on topic Possible Cache Bug?
Hi,
That can be caused by one of the following issues:

1- Google Live Synchronization is conflicting between the data in the Spreadsheet and the data that comes from the Editor, so, it may attend to download the spreadsheet data and use that.
See this post, for things to try:
inter-illusion.com/forum/i2-localization...ssing-on-device#3151
e.g. uninstall the app from the device to clean all the cache, before doing a build make sure that the Spreadsheet and the Editor are synchronized (either import or export to google)

or

2- Auto-Unload languages is using a very old cache

If auto-unload languages is enabled (in the I2Languages.asset, Languages tab, there is a setting for "Unload languages at runtime"). The plugin keeps a cache of each language, so that it can unload from memory the ones that are not been used.

However, a few versions ago, the format of that cache changed to account for a more secure synchronization. But if you have those old files in the device, it can happen that the access is failing so it gets skipped and what you are seeing is just the fallbacks.

One way to test thats the case, is by disabling the Unload languages (just set the dropdown to NEVER). Also, uninstalling the game from the device and reinstalling, will clean all the old data.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #3412 by Stiv
Replied by Stiv on topic Possible Cache Bug?
Hi Frank,

Thanks for your help! It definitely looks like it’s the second issue. I’m updating a game that hasn’t been updated in a very long time and disabling “Unload Languages” does seem to resolve the issue.

The game still has over 100k active installs so I need to be careful about how I approach this next update. Is my only option to leave Unload Languages set to Never and presumably take a small hit to memory usage? Is there any way to clear this old cache without doing a reinstall?

Thanks again!

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #3414 by Frank
Replied by Frank on topic Possible Cache Bug?
Hi,

There are two ways you can set the next update so that it fixes the cached files. And then in the update after that, you can return the setting to normal.

- You can set the Unload Languages to NEVER in the next update, so that the cache gets deleted. Then in the next update, you revert that setting to InGameOnly, users will have the cache fixed and the new file structure avoid future problems like that.

or

- You can keep it as InGameOnly, but put the UpdateFrequency of the Google Spreadsheet to Daily. Then, make sure the Spreadsheet is not up-to-date with the editor when you do the build. That way, your users will download the latest spreadsheet and override the cache. (this is only needed for this updates - or for the first few weeks)


I advise you to use the first approach as its the safest way to guarantee it will work for all your users.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: Stiv

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #3417 by Stiv
Replied by Stiv on topic Possible Cache Bug?
I will go with option 1 like you suggested. Thanks again for your fantastic support!

Please Log in or Create an account to join the conversation.

Time to create page: 0.176 seconds
Template by JoomlaShine