fabulous-dev / Fabulous.Avalonia

Declarative UIs for Avalonia with F# and MVU, using Fabulous
https://docs.fabulous.dev/avalonia
Apache License 2.0
132 stars 10 forks source link

Multi template crashes on launch on iOS #256

Open evelant opened 2 weeks ago

evelant commented 2 weeks ago

Sorry if there's an obvious solution, I'm new to .net, f#, fabulous, and avalonia. I created a new project with the multi template and set up code signing but when I try to run it on an iOS simulator it crashes on launch with the trace below.

This is with xcode 15.4 on an iOS 17.5 simulator. I updated nuget packages to avalonia 11.1.3 and it still happens. Not really sure how I can diagnose this further but it seems like the template is broken out of the box for iOS at the moment.

/nix/store/rg6ivy78kvdzdlkj7l21i8jkdg7hk9ix-dotnet-sdk-8.0.401/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/tools/bin/mlaunch --launchsim /Users/imagio/dev/dotnet/CubeControl/Aperture/CubeControlUI.iOS/bin/Debug/net8.0-ios/iossimulator-arm64/CubeControlUI.iOS.app --device=:v2:udid=E0CAF457-5092-4529-8D4A-C4A0C7516620 -sdk 17.5 --sdkroot /Applications/Xcode.app/Contents/Developer
xcrun simctl launch --console --terminate-running-process E0CAF457-5092-4529-8D4A-C4A0C7516620 CubeControl.Aperture
CubeControl.Aperture: 31599
2024-08-31 10:05:21.490989-0400 CubeControlUI.iOS[31599:19506974] Microsoft.iOS: Socket error while connecting to IDE on 127.0.0.1:10000: Connection refused
2024-08-31 10:05:21.510116-0400 CubeControlUI.iOS[31599:19506916] error: Failed to load AOT module 'System.Private.CoreLib' while running in aot-only mode: not compiled with --aot=interp.

=================================================================
    Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x10f3fc1dc - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
    0x10f3ac3c8 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_handle_native_crash
    0x10f57abd4 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : sigabrt_signal_handler.cold.1
    0x10f3fba9c - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_runtime_setup_stat_profiler
    0x10d45f7e0 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x10e287124 - /usr/lib/system/libsystem_pthread.dylib : pthread_kill
    0x1801655c0 - /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
    0x10f44da98 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_log_write_os_log
    0x10f43f08c - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : monoeg_g_logv
    0x10f43f1d4 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : monoeg_g_log
    0x10f391cc4 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : load_aot_module
    0x10f465d04 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_assembly_request_load_from
    0x10f465824 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_assembly_request_open
    0x10f467534 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_assembly_open
    0x10e19af64 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libxamarin-dotnet-debug.dylib : xamarin_assembly_preload_hook
    0x10f467ce8 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : invoke_assembly_preload_hook
    0x10f467ed8 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_assembly_load_corlib
    0x10f4629d8 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_init
    0x10f314d0c - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mini_init
    0x10f36e644 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libmonosgen-2.0.dylib : mono_jit_init_version
    0x10e195460 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libxamarin-dotnet-debug.dylib : xamarin_bridge_initialize
    0x10e19b81c - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/libxamarin-dotnet-debug.dylib : xamarin_main
    0x108af4c50 - /Users/imagio/Library/Developer/CoreSimulator/Devices/E0CAF457-5092-4529-8D4A-C4A0C7516620/data/Containers/Bundle/Application/0E5EA87F-8783-48A2-9DCF-10B12DDE7113/CubeControlUI.iOS.app/CubeControlUI.iOS : main
    0x10d525544 - Unknown
    0x10cf16154 - Unknown
    0x693c000000000000 - Unknown

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x10e0c8f30):0x10e0c8f20  c0 03 5f d6 c0 03 5f d6 10 29 80 d2 01 10 00 d4  .._..._..)......
0x10e0c8f30  e3 00 00 54 fd 7b bf a9 fd 03 00 91 ed e2 ff 97  ...T.{..........
0x10e0c8f40  bf 03 00 91 fd 7b c1 a8 c0 03 5f d6 c0 03 5f d6  .....{...._..._.
0x10e0c8f50  70 0a 80 d2 01 10 00 d4 e3 00 00 54 fd 7b bf a9  p..........T.{..
evelant commented 2 weeks ago

The rider console is outputting this which may be helpful

error: Failed to load AOT module 'Avalonia.Base' while running in aot-only mode: doesn't match assembly.

evelant commented 2 weeks ago

It works if I install dotnet 9 preview sdk, use the template from the release/3.0 branch, and update all dependencies to the latest beta versions