Page 1 of 1

[v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Fri Dec 17, 2021 5:00 pm
by demitsuri
Hi there!

I'm suffering with NPE which occurred on my Xiaomi Redmi Note 9S (MIUI Global 12.5.2).
My app version is v0.7.14, installed from Google Play Store.

I have cloned Andor's trail app at the begining (Xiaomi firmware allows to make a "duplicate" of installed app, which has own cache, own private storage and own emulated sd card).
Both copies of the game worked perectly after update to v0.7.14 and after firmware update whic happened a little bit later.
The main copy of the game still works fine, but a couple days ago cloned game started to crash at the start.

It seems like Android API started to return null instead File object on external storage request for cloned apps and the game can't handle it.

Crashlog is here: https://pastebin.com/QSsBYGjz

Please help me to solve this and backup my saves.

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Fri Dec 17, 2021 11:19 pm
by rijackson741
Hello demitsuri, and welcome to the forums.

What is the purpose for the cloned game?

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Sat Dec 18, 2021 3:04 pm
by demitsuri
My aim was to separate two main characters. I know that I can just use single instance of game for both of them, but once I saved a progress with character named after my son over a slot with character named after my daughter. So, dual apps looked like a good solution for avoiding such situations.

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Sat Dec 18, 2021 5:01 pm
by Nut
I am not happy with the way we handle the savegames too, just one long list.
We might change it e.g. to a second level list: In the first list you can see just the Hero names, and clicking into it, you'll see the according savegames.
This would be easier to choose a savegame, and would also restrict to save over a different character.

Such a change would make a separate installation for your purpose obsolete at least.
But don't expect it soon - definitly not ths year :mrgreen:

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Sat Dec 18, 2021 6:05 pm
by demitsuri
Currently the main trouble is the fact that my saves from the cloned game are inaccessible due to crash. At this time I'd better have a mechanism to backup/restore savegames.

I can help with it as far as I'm an android developer, but I need someone inside development team who is interested in this functionality.

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Mon Dec 20, 2021 12:17 am
by rijackson741
Well, we could certainly use help from anyone that's an Android developer.

Everyone on the dev team would be interested in backup/restore savegame functionality. This has come up so many times there's a sticky thread on it: viewtopic.php?t=6283. But Google has now thrown us a curveball, by forcing us to save games in a folder that's not so easy to access (possible, using certain file management apps, but a real PITA). One benefit of this new file location is that a backup of everything to Google will backup the savegames. But it would be very nice to have a way to back them up outside of Google.

Re: [v0.7.14] Crash on Xiaomi (MIUI 12.5.2) with dual apps

Posted: Tue Jan 04, 2022 7:07 pm
by demitsuri
I suppose this issue is about my crash: https://github.com/AndorsTrailRelease/a ... /issues/40

At least, a code snippet from it looks uncommon. :oops: