Issue with Assets path when the windows user name have some foreign characters


So after releasing my game, some players came with this crash that prevents loading assets at all.
I couldn’t figure what was the issue untill a Korean player sent me a mail finding a fix by himself :

“I have found a workaround for the Error-Null Object Reference.
Solution: Your Windows account name should be in English.”

It turns out Assets coming from Starling assetmanager or Lime Assets can’t be found if the user name has some foreign characters.
It’s not only Korean characters, even French characters like “é” also trigger the crash.
I thought it would be the case only when using applicationStorageDirectory.
But apparently it’s even there when trying to reach a game local asset.

Can someone help me to find a solution to this.
Thank you !


I believe this is an issue with Haxe String, which is resolved (somewhat) within TextField by using a special UTF8 String that’s slower, but works around some issues. Perhaps the path returns, but the rest of our String code in loading the assets fails.

I wonder if HashLink handles this any better.

Perhaps try and replace some additional strings with UTF8String, is it easy to reproduce the crash on your system?


It’s not possible for me to reproduce because windows 10 handles this user’s name folder thing differently.

I can’t know exactly where String changes the characters to a wrong path.

I’m changing Lime’s system and assets classes, I guess that’s the only way to test if I can fix it for now.

So I switched to UTF8String for all paths related variable in lime.system.System, lime.utils.AssetLibrary, lime.utils.PackedAssetLybrary, starling.utils.AssetManager, lime.utils.Bytes
I will come back here after seeing if this fixed user’s issue.


I think you already fixed it @singmajesty :joy: :

I need to confirm with players.

This is not in the official hxcpp yet, it’s only fixed on the github version.