Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9.0 Preview 3 crashes SkiaSharp 3.0 in Release mode (possible ICU / Globalization problem) #101107

Open
janne-hmp opened this issue Apr 16, 2024 · 10 comments
Assignees
Labels
area-System.Globalization needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity os-android
Milestone

Comments

@janne-hmp
Copy link

Description

We are developing a game called GnollHack using .NET MAUI 9.0. After upgrading to .NET 9.0 Preview 3 from 2, the game crashes immediately at start in Release mode both with SkiaSharp 3.0 Preview 2.1 and Preview 3.1. Based on logs this seems to be an ICU / Globalization problem. mattleibow from SkiaSharp repository asked me to post this to this repository.

The exception thrown is: mono-rt : [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CompareInfo

This comes after monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail

The logs from Android are below.

Reproduction Steps

  1. Clone GnollHack repository (https://github.com/hyvanmielenpelit/GnollHack)
  2. Make sure you are using .NET 9.0 Preview 3
  3. Build GnollHackX in Release mode using the instructions in the wiki
  4. Build GnollHackM in Release mode
  5. Deploy GnollHackM to an Android phone.
  6. Start GnollHackM on the phone

Expected behavior

The game starts normally.

Actual behavior

The game crashes at start.

Regression?

Yes, .NET 9.0 Preview 2 worked fine.

Known Workarounds

None, have to use .NET 9.0 Preview 2

Configuration

.NET 9.0 Preview 3 / .NET MAUI 9.0 Preview 3
Android 14 (Samsung S22)
ARM64
Does not seem to depend on the phone, crashes on all phones we tried

Other information

And here's the log for .NET 9.0 Preview 3 crash:

04-15 20:38:07.568  4173  4324 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10297; state: ENABLED
04-15 21:00:00.340  8000  8000 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10306; state: ENABLED
04-15 21:38:18.385 32112 32112 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10239; state: ENABLED
04-15 21:43:27.770   924   924 D Zygote  : Forked child process 10923
04-15 21:43:27.770  1412  1484 I ActivityManager: Start proc 10923:com.soundmindgames.gnollhackm/u0a307 for top-activity {com.soundmindgames.gnollhackm/crc6481ebf3e09068bf87.MainActivity}
04-15 21:43:27.778 10923 10923 I ames.gnollhackm: Using CollectorTypeCMC GC.
04-15 21:43:27.780 10923 10923 E ames.gnollhackm: Not starting debugger since process cannot load the jdwp agent.
04-15 21:43:27.783 10923 10923 D ActivityThread: setConscryptValidator
04-15 21:43:27.783 10923 10923 D ActivityThread: setConscryptValidator - put
04-15 21:43:27.788 10923 10923 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10307; state: ENABLED
04-15 21:43:27.788 10923 10923 D CompatibilityChangeReporter: Compat change id reported: 242716250; UID 10307; state: ENABLED
04-15 21:43:27.791 10923 10923 D nativeloader: Configuring clns-4 for other apk /data/app/~~0TIYkF9E1cLppmhZJ8PC2A==/com.soundmindgames.gnollhackm-8jKvxzZZD9yN9K2b_DDCfw==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~0TIYkF9E1cLppmhZJ8PC2A==/com.soundmindgames.gnollhackm-8jKvxzZZD9yN9K2b_DDCfw==/lib/arm64:/data/app/~~0TIYkF9E1cLppmhZJ8PC2A==/com.soundmindgames.gnollhackm-8jKvxzZZD9yN9K2b_DDCfw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.soundmindgames.gnollhackm
04-15 21:43:27.794  1412  1467 D PkgPredictorService-SecIpmManagerServiceImpl: onForegroundActivitiesChanged pid:10923 uid:10307
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment: Currently set values for:
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment:   angle_gl_driver_selection_pkgs=[]
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment:   angle_gl_driver_selection_values=[]
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment: ANGLE GameManagerService for com.soundmindgames.gnollhackm: false
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment: com.soundmindgames.gnollhackm is not listed in per-application setting
04-15 21:43:27.797 10923 10923 V GraphicsEnvironment: App is not on the allowlist for updatable production driver.
04-15 21:43:27.803 10923 10923 I DOTNET  : JNI_OnLoad: JNI_OnLoad in pal_jni.c
04-15 21:43:27.803 10923 10923 D DOTNET  : GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
04-15 21:43:27.872 10923 10923 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 21:43:27.873 10923 10923 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 21:43:27.873 10923 10923 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 21:43:27.882 10923 10923 F mono-rt : [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CompareInfo
04-15 21:43:27.882 10923 10923 F mono-rt :  ---> System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CultureInfo
04-15 21:43:27.882 10923 10923 F mono-rt :  ---> System.TypeInitializationException: TypeInitialization_Type, Settings
04-15 21:43:27.882 10923 10923 F mono-rt :  ---> System.DllNotFoundException: libSystem.Globalization.Native
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.GlobalizationMode.LoadICU()
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.GlobalizationMode.Settings..cctor()
04-15 21:43:27.882 10923 10923 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.GlobalizationMode.get_Invariant()
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.CultureData.CreateCultureWithInvariantData()
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.CultureData.get_Invariant()
04-15 21:43:27.882 10923 10923 F mono-rt :    at System.Globalization.CultureInfo..cctor()
04-15 21:43:27.882 10923 10923 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 21:43:27.882 10923 10923 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 21:43:27.882 10923 10923 F mono-rt :    at Java.Interop.TypeManager.RegisterType(String , Type )
04-15 21:43:27.882 10923 10923 F mono-rt :    at Android.Runtime.JNIEnvInit.RegisterJniNatives(IntPtr , Int32 , IntPtr , IntPtr , Int32 )
04-15 21:43:27.918  1412  1993 I ActivityManager: Process com.soundmindgames.gnollhackm (pid 10923) has died: fg  TOP (671,3230)
04-15 21:43:27.918  1412  1486 I libprocessgroup: Successfully killed process cgroup uid 10307 pid 10923 in 0ms
04-15 21:43:27.918   924   924 I Zygote  : Process 10923 exited cleanly (1)

Here's the log using Preview 2 and SkiaSharp 3.0 Preview 3.1 that also sometimes crashed in the same way. They all seem to be related.

04-15 12:42:53.555  1266  1266 D Zygote  : Forked child process 14629
04-15 12:42:53.555  1656  2068 I ActivityManager: Start proc 14629:com.soundmindgames.gnollhackm/u0a593 for top-activity {com.soundmindgames.gnollhackm/crc6481ebf3e09068bf87.MainActivity}
04-15 12:42:53.567 14629 14629 I ames.gnollhackm: Using CollectorTypeCC GC.
04-15 12:42:53.569 14629 14629 E ames.gnollhackm: Not starting debugger since process cannot load the jdwp agent.
04-15 12:42:53.573 14629 14629 D ActivityThread: setConscryptValidator
04-15 12:42:53.573 14629 14629 D ActivityThread: setConscryptValidator - put
04-15 12:42:53.581 14629 14629 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10593; state: ENABLED
04-15 12:42:53.581 14629 14629 D CompatibilityChangeReporter: Compat change id reported: 242716250; UID 10593; state: ENABLED
04-15 12:42:53.586 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.arm64_v8a.dm': No such file or directory
04-15 12:42:53.586 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.arm64_v8a.dm': No such file or directory
04-15 12:42:53.587 14629 14629 W ames.gnollhackm: Entry not found
04-15 12:42:53.587 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.en.dm': No such file or directory
04-15 12:42:53.587 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.en.dm': No such file or directory
04-15 12:42:53.588 14629 14629 W ames.gnollhackm: Entry not found
04-15 12:42:53.588 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.fi.dm': No such file or directory
04-15 12:42:53.588 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.fi.dm': No such file or directory
04-15 12:42:53.588 14629 14629 W ames.gnollhackm: Entry not found
04-15 12:42:53.588 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.xxhdpi.dm': No such file or directory
04-15 12:42:53.588 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.xxhdpi.dm': No such file or directory
04-15 12:42:53.588  1656  2042 D PkgPredictorService-SecIpmManagerServiceImpl: onForegroundActivitiesChanged pid:14629 uid:10593
04-15 12:42:53.589 14629 14629 W ames.gnollhackm: Entry not found
04-15 12:42:53.589 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_installtimepack.dm': No such file or directory
04-15 12:42:53.589 14629 14629 W ziparchive: Unable to open '/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_installtimepack.dm': No such file or directory
04-15 12:42:53.589 14629 14629 W ames.gnollhackm: Entry not found
04-15 12:42:53.591 14629 14629 D nativeloader: Configuring clns-4 for other apk /data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/base.apk:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.arm64_v8a.apk:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.en.apk:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.fi.apk:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_config.xxhdpi.apk:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/split_installtimepack.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/lib/arm64:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com.soundmindgames.gnollhackm-zy7V-_oFhQz3D1Bb2oDbEQ==/base.apk!/lib/arm64-v8a:/data/app/~~Qx-ZqsTMknh7WSkBNzt8nw==/com
04-15 12:42:53.599 14629 14629 V GraphicsEnvironment: Currently set values for:
04-15 12:42:53.600 14629 14629 V GraphicsEnvironment:   angle_gl_driver_selection_pkgs=[]
04-15 12:42:53.600 14629 14629 V GraphicsEnvironment:   angle_gl_driver_selection_values=[]
04-15 12:42:53.600 14629 14629 V GraphicsEnvironment: ANGLE GameManagerService for com.soundmindgames.gnollhackm: false
04-15 12:42:53.600 14629 14629 V GraphicsEnvironment: com.soundmindgames.gnollhackm is not listed in per-application setting
04-15 12:42:53.600 14629 14629 V GraphicsEnvironment: Updatable production driver is not supported on the device.
04-15 12:42:53.608 14629 14629 I DOTNET  : JNI_OnLoad: JNI_OnLoad in pal_jni.c
04-15 12:42:53.608 14629 14629 D DOTNET  : GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
04-15 12:42:53.610 14629 14629 W monodroid: Failed to create directory '/data/user/0/com.soundmindgames.gnollhackm/files/.__override__/arm64-v8a'. No such file or directory
04-15 12:42:53.610 14629 14629 W monodroid: Creating public update directory: `/data/user/0/com.soundmindgames.gnollhackm/files/.__override__/arm64-v8a`
04-15 12:42:53.712 14629 14629 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 12:42:53.720 14629 14629 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 12:42:53.727 14629 14629 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 12:42:53.745 14629 14629 F mono-rt : [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CompareInfo
04-15 12:42:53.745 14629 14629 F mono-rt :  ---> System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CultureInfo
04-15 12:42:53.745 14629 14629 F mono-rt :  ---> System.TypeInitializationException: TypeInitialization_Type, Settings
04-15 12:42:53.745 14629 14629 F mono-rt :  ---> System.DllNotFoundException: libSystem.Globalization.Native
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.GlobalizationMode.LoadICU()
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.GlobalizationMode.Settings..cctor()
04-15 12:42:53.745 14629 14629 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.GlobalizationMode.get_Invariant()
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.CultureData.CreateCultureWithInvariantData()
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.CultureData.get_Invariant()
04-15 12:42:53.745 14629 14629 F mono-rt :    at System.Globalization.CultureInfo..cctor()
04-15 12:42:53.745 14629 14629 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 12:42:53.745 14629 14629 F mono-rt :    Exception_EndOfInnerExceptionStack
04-15 12:42:53.745 14629 14629 F mono-rt :    at Java.Interop.TypeManager.RegisterType(String , Type )
04-15 12:42:53.745 14629 14629 F mono-rt :    at Android.Runtime.JNIEnvInit.RegisterJniNatives(IntPtr , Int32 , IntPtr , IntPtr , Int32 )
04-15 12:42:53.777  1656  4724 I ActivityManager: Process com.soundmindgames.gnollhackm (pid 14629) has died: fg  TOP (218,1595)
04-15 12:42:53.777  1266  1266 I Zygote  : Process 14629 exited cleanly (1)
04-15 12:42:53.777  1656  2076 I libprocessgroup: Successfully killed process cgroup uid 10593 pid 14629 in 0ms
04-15 12:42:55.580  1371  1470 E ANDR-PERF-UTIL: Failed to update node /proc/14629/sched_boost with value 0
04-15 12:42:55.580  1371  1470 E ANDR-PERF-OPTSHANDLER: can't reset task 14629

Here's the another such log:

04-15 16:47:14.779 13737 13737 D nativeloader: Configuring clns-4 for other apk /data/app/~~O5RWJhgS6Zk8k0MBH8yrpA==/com.soundmindgames.gnollhackm-RXV8I9Pt69CLmHl5ap2PBg==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~O5RWJhgS6Zk8k0MBH8yrpA==/com.soundmindgames.gnollhackm-RXV8I9Pt69CLmHl5ap2PBg==/lib/arm64:/data/app/~~O5RWJhgS6Zk8k0MBH8yrpA==/com.soundmindgames.gnollhackm-RXV8I9Pt69CLmHl5ap2PBg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.soundmindgames.gnollhackm
04-15 16:47:14.795 13737 13737 V GraphicsEnvironment: Currently set values for:
04-15 16:47:14.795 13737 13737 V GraphicsEnvironment:   angle_gl_driver_selection_pkgs=[]
04-15 16:47:14.795 13737 13737 V GraphicsEnvironment:   angle_gl_driver_selection_values=[]
04-15 16:47:14.795 13737 13737 V GraphicsEnvironment: ANGLE GameManagerService for com.soundmindgames.gnollhackm: false
04-15 16:47:14.795 13737 13737 V GraphicsEnvironment: com.soundmindgames.gnollhackm is not listed in per-application setting
04-15 16:47:14.796 13737 13737 V GraphicsEnvironment: Updatable production driver is not supported on the device.
04-15 16:47:14.865 13737 13737 I DOTNET  : JNI_OnLoad: JNI_OnLoad in pal_jni.c
04-15 16:47:14.866 13737 13737 D DOTNET  : GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
04-15 16:47:14.879 13737 13737 W monodroid: Failed to create directory '/data/user/0/com.soundmindgames.gnollhackm/files/.__override__/arm64-v8a'. No such file or directory
04-15 16:47:14.879 13737 13737 W monodroid: Creating public update directory: `/data/user/0/com.soundmindgames.gnollhackm/files/.__override__/arm64-v8a`
04-15 16:47:14.881 13737 13737 W ames.gnollhackm: Attempt to remove non-JNI local reference
04-15 16:47:15.247 13737 13737 W monodroid-debug: Trying to initialize the debugger with options: --debugger-agent=transport=socket-fd,address=85,embedding=1
04-15 16:47:16.884 13737 13737 W monodroid: runtime args empty
04-15 16:47:16.888 13737 13737 W monodroid-assembly: Unable to open app library directory '/data/user/0/com.soundmindgames.gnollhackm/files/.__override__/arm64-v8a': No such file or directory
04-15 16:47:19.657  1656  3110 I Pageboost: IoRecord pid : 13737
04-15 16:47:19.725  1656  3110 I Pageboost: IoRecord pid : 13737, result_size : 19133
04-15 16:47:19.794  1656  3110 I Pageboost: memUsage collected : 128565 0 0 for com.soundmindgames.gnollhackm 13737
04-15 16:47:20.149   692   692 D io_stats: !@ Read_top(KB): ames.gnollhackm(13737) 131160 .android.chrome(15263) 752 system_server(1656) 680
04-15 16:47:20.831 13737 13737 W ames.gnollhackm: Attempt to remove non-JNI local reference
04-15 16:47:20.916 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 16:47:20.926 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 16:47:20.930 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_LoadICU' may fail
04-15 16:47:20.954 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_GetLocaleName' may fail
04-15 16:47:20.957 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_GetLocaleName' may fail
04-15 16:47:20.960 13737 13737 W monodroid-assembly: Shared library 'libSystem.Globalization.Native' not loaded, p/invoke 'GlobalizationNative_GetLocaleName' may fail
04-15 16:47:20.973 13737 13737 W ames.gnollhackm: Process terminated.
04-15 16:47:20.973 13737 13737 W ames.gnollhackm: Encountered infinite recursion while looking up resource 'Arg_DllNotFoundException' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted.
04-15 16:47:20.973 13737 13737 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 13737 (ames.gnollhackm), pid 13737 (ames.gnollhackm)
04-15 16:47:21.032   747   747 I tombstoned: received crash request for pid 13737
04-15 16:47:21.033 13778 13778 I crash_dump64: performing dump of process 13737 (target tid = 13737)
04-15 16:47:21.382 13778 13778 F DEBUG   : pid: 13737, tid: 13737, name: ames.gnollhackm  >>> com.soundmindgames.gnollhackm <<<
04-15 16:47:21.436  1266  1266 I Zygote  : Process 13737 exited due to signal 6 (Aborted)
04-15 16:47:21.459  1656  3778 I ActivityManager: Process com.soundmindgames.gnollhackm (pid 13737) has died: fg  TOP (225,1750)
04-15 16:47:21.461  1656  2076 I libprocessgroup: Successfully killed process cgroup uid 10602 pid 13737 in 2ms
04-15 16:47:24.152   692   692 D io_stats: !@ Read_top(KB): crash_dump64(13778) 6308 loop31(824) 2588 ames.gnollhackm(13737) 2216
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 16, 2024
@vcsjones vcsjones added area-System.Globalization and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 16, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@ivanpovazan
Copy link
Member

@mkhamoyan @matouskozak could it be that the recent HybridGlobalization changes for iOS regressed something on Android?

@mkhamoyan
Copy link
Member

I only recall this PR #98495 (not related to HybridGlobalization) but not sure if this could cause.
@akoeplinger do you think these changes can be related ?

@ivanpovazan ivanpovazan added this to the 9.0.0 milestone Apr 16, 2024
@pasha-o
Copy link

pasha-o commented Apr 17, 2024

what happens if you put the following in the project file

	<PropertyGroup>
		<InvariantGlobalization>true</InvariantGlobalization>
	</PropertyGroup>

@janne-hmp
Copy link
Author

janne-hmp commented Apr 17, 2024

Looks like the app builds and starts then just fine with .NET 9.0 Preview 3 and InvariantGlobalization added. If I remove InvariantGlobalization from the project file, the app crashes in release again with .NET 9.0 Preview 3.

@ivanpovazan
Copy link
Member

Thank you for checking it out.
@matouskozak can you take a look?

@ivanpovazan ivanpovazan removed the untriaged New issue has not been triaged by the area owner label Apr 17, 2024
@janne-hmp
Copy link
Author

janne-hmp commented Apr 18, 2024

It looks like even the default .NET MAUI 9.0 project on Android does not start without <InvariantGlobalization>true</InvariantGlobalization> and does start with it. (Although this may be after I added SkiaSharp to it.)

@matouskozak
Copy link
Member

matouskozak commented May 16, 2024

Preview 2 and SkiaSharp 3.0 Preview 3.1 that also sometimes crashed in the same way. They all seem to be related.

@janne-hmp do you happen to have a smaller repro code that I could try on my machine to further investigate? I tried some small app containing:

SkiaSharp.SKImageInfo info = new SkiaSharp.SKImageInfo(100, 100);
Console.WriteLine($"SkiaSharp Version: {info.ColorType}");	

with these packages:

<PackageReference Include="SkiaSharp" Version="3.0.0-preview.3.1" />
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="3.0.0-preview.3.1" />

that crashed in Release mode on Android (Debug working properly)

05-16 17:59:18.089 20145 20145 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000234
05-16 17:59:18.089 20145 20145 F DEBUG   : Cause: null pointer dereference
05-16 17:59:18.089 20145 20145 F DEBUG   :     x0  0000000000000000  x1  000000703536454c  x2  000000703536454c  x3  0000007fc9f6ca58
05-16 17:59:18.089 20145 20145 F DEBUG   :     x4  0000000000000080  x5  b400006e04047050  x6  6f6e20646c756f43  x7  7320646e69662074
05-16 17:59:18.089 20145 20145 F DEBUG   :     x8  0000000000000234  x9  b400006eb4045eb0  x10 0000000000000090  x11 000000000000000f
05-16 17:59:18.089 20145 20145 F DEBUG   :     x12 0000000000004b73  x13 6f6d203a6c6f626d  x14 0000000000000000  x15 00000070352b6662
05-16 17:59:18.089 20145 20145 F DEBUG   :     x16 0000000000000001  x17 00000070352cefc0  x18 000000705065e000  x19 b400006e140482e0
05-16 17:59:18.089 20145 20145 F DEBUG   :     x20 b400006e3405aa90  x21 b400006e04047000  x22 b400006dc4061c10  x23 0000000000000000
05-16 17:59:18.089 20145 20145 F DEBUG   :     x24 b400006da40422f0  x25 b400006e140482f0  x26 0000006d1b45c35d  x27 0000006d1d5b8d24
05-16 17:59:18.089 20145 20145 F DEBUG   :     x28 b400006da4042610  x29 0000007fc9f6cbe0
05-16 17:59:18.089 20145 20145 F DEBUG   :     lr  0000006d1d3f5198  sp  0000007fc9f6cb50  pc  0000006d1d3f51a4  pst 0000000060001000
05-16 17:59:18.089 20145 20145 F DEBUG   : backtrace:
05-16 17:59:18.089 20145 20145 F DEBUG   :       #00 pc 00000000001361a4  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #01 pc 00000000001fbb08  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #02 pc 00000000001fc830  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #03 pc 00000000001fdd0c  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_assembly_load_from_full+116) (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #04 pc 000000000001c060  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmono-android.release.so (xamarin::android::internal::EmbeddedAssemblies::open_from_bundles(void*, _MonoAssemblyName*, char**, void*, _MonoError*)+7028) (BuildId: 941d3c28803eb1b4b2fb9ecfdf447edfd0a21e95)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #05 pc 00000000001fe438  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #06 pc 00000000001fb924  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_assembly_request_byname+972) (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #07 pc 00000000001401fc  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #08 pc 0000000000140bec  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #09 pc 000000000013c97c  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #10 pc 000000000013c680  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #11 pc 000000000014fbd4  /data/app/~~m1XkJ-KmUh-yEuPkLBkUnQ==/com.companyname.androidmaui-dcCfcWpjO-jcwfm2lAqdUA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 2929beb5d26398447fb2d28409a70eccf684c59e)
05-16 17:59:18.089 20145 20145 F DEBUG   :       #12 pc 0000000000004ee8  <anonymous:703bd29000>

However, the failure with Globalization you were seeing I wasn't able to reproduce. I tried inserting some Globalization-related code into my program and worked correctly so I suspect the Globalization native file was loaded as expected.

@matouskozak matouskozak added the needs-author-action An issue or pull request that requires more info or actions from the author. label May 20, 2024
Copy link
Contributor

This issue has been marked needs-author-action and may be missing some important information.

Copy link
Contributor

This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Globalization needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity os-android
Projects
None yet
Development

No branches or pull requests

6 participants