Open dbriard opened 2 months ago
Additional details:
I tried without AOT compilation and the problem do not happen. So far, GetChars only fail on .NET8 + Android real device + Chrome + AOT compilation.
I also tested on Firefox android, no problem, and on iPhone (Safari and Chrome), no problem...
So in the end, not sure if the issue is in .NET8 or Chrome ARM on android...
If you need additionnal info, let me know.
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Tagging subscribers to this area: @dotnet/area-system-globalization See info in area-owners.md if you want to be subscribed.
Tagging subscribers to this area: @dotnet/area-system-text-encoding See info in area-owners.md if you want to be subscribed.
Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.
CC @lewing
I think this is probabaly a chrome issue where there is a bug when running wasm on a 32bit build, Chrome on android is shipped as a 32 bit executable by default. All the scenarios where chrome works are 64 bit builds.
@kg what is the best way to file issues like this?
Description
Hi all, I discoved a strange issue in .NET8. I have a WASM application build using Avalonia framework that was running fine on my platforms (desktop browsers, and android browsers). After I migrated from .NET7 to .NET8, the "website" failed to load on my Android device throwning a exception.
I debugged as deep as I could and found that the problem come from the GetChars function in Encoding.UTF8.GetDecoder().
The function is used by ReadString() of BinaryReader.
Here my debug output on platforms that works:
And here is the same on my android phone using Chrome latest version.
The 15 first characters are not read correctly! I read severals strings, and for each strings the first 15 characters are 0.
What is really strange, is that on the same device, there is no problem when I run the website on Edge browser. Same issue on a different phone.
Here more tests:
Android device 1/Chrome => BUG Android device 2/Chrome => BUG Android device 1/Chrome BETA => BUG Android simulator on Windows 11/Chrome => work Android device 1/Edge => work Windows11/Edge => work Windows11/Firefox => work Windows11/Chrome => work
My code is compiled using AOT.
Reproduction Steps
Try to decode the following byte array on a WASM app (AOT?) on Android physical device in Chrome browser.
Expected behavior
The result should be:
Actual behavior
The 15 first chars are 0 on android device using chrome.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
I cannot debug more deeper as the code is not accessible: