v0.5.3127: Rampant texture swapping on Android

Android has a tendency to just pick a texture at random. This doesn’t happen on iOS or DotNetExe. Examples:

It sometimes offers up textures we don’t govern:

This has been an issue for us for many months. Happens quite often, only on Android.

With the latest release of Fuse (0.5.5000) this is 99% reproducible.

It has become so easy to reproduce that it quite literally happens every time the app starts on Android (and only on Android).

This has gone from being a nuisance to being a blocker.

Again: I am not 100% certain this isn’t in our code, but it only exhibits this behavior on Android. It also randomly references textures that we do not control, as in textures that are loaded using Image File="..." will be randomly swapped in for textures we manage. And, as you can see above, also the character set.

Duckers fixed this today. He can probably give a more technical explanation, but my understanding is this:

On some devices (and only some), the callback from the workers that loaded the textures might end up on the wrong threads, and this will cause an exception that is unfortunately swallowed by Experimental.TextureLoader. By adding an UpdateManager.AddOnceAction with a manual closure around the returning request, this is forced on the GUI thread and works fine. It was pretty hard to track down because it works on most devices.

This is still an issue that should be fixed in fuselibs, as the callbacks should be dispatched on the gui thread by default, but I’m happy with the workaround for now.