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

Starting App on iOS fails with System.ExecutingEngineException #80853

Closed
rolfbjarne opened this issue Jan 19, 2023 · 38 comments · Fixed by #85923
Closed

Starting App on iOS fails with System.ExecutingEngineException #80853

rolfbjarne opened this issue Jan 19, 2023 · 38 comments · Fixed by #85923
Assignees
Milestone

Comments

@rolfbjarne
Copy link
Member

From @jhimes144 on Sun, 08 Jan 2023 04:51:56 GMT

This is an issue I have raised over in Avalonia here AvaloniaUI/Avalonia#9934
To the best of our knowledge, the below method GetStringNative should not have any problem with AOT, and everything works fine on Android with AOT enabled. So far I've reproduced this on two separate code bases.

Steps to Reproduce

  1. Create a new dotnet solution using the Avalonia xplat template. See https://github.com/AvaloniaUI/avalonia-dotnet-templates
  2. Insert needed CodesignKey in project file for the ios project
  3. Build and run the ios project on a physical ios device

Expected Behavior

The app runs

Actual Behavior

The following exception is raised on app startup

System.ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) intptr Avalonia.OpenGL.GlBasicInfoInterface:wrapper_native_indirect_0x283931e40 (intptr&,int)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

  at Avalonia.OpenGL.GlBasicInfoInterface.GetStringNative(Int32 v) in /_/src/Avalonia.OpenGL/DevGenerators/Generator.GetProcAddressInitializationGenerator/globalAvalonia.OpenGL.GlBasicInfoInterface.cs:13
  at Avalonia.OpenGL.GlBasicInfoInterface.GetString(Int32 v) in /_/src/Avalonia.OpenGL/GlBasicInfoInterface.cs:27
  at Avalonia.OpenGL.GlBasicInfoInterface.GetExtensions() in /_/src/Avalonia.OpenGL/GlBasicInfoInterface.cs:43
  at Avalonia.OpenGL.GlInterface.GlContextInfo.Create(GlVersion version, Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlInterface.cs:33
  at Avalonia.OpenGL.GlInterface..ctor(GlVersion version, Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlInterface.cs:48
  at Avalonia.iOS.GlContext..ctor() in /_/src/iOS/Avalonia.iOS/EaglDisplay.cs:30
  at Avalonia.iOS.EaglFeature..ctor() in /_/src/iOS/Avalonia.iOS/EaglDisplay.cs:17
  at Avalonia.iOS.Platform.Register() in /_/src/iOS/Avalonia.iOS/Platform.cs:34
  at at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].Setup()
  at at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].SetupWithLifetime(IApplicationLifetime lifetime)
  at at Avalonia.iOS.AvaloniaAppDelegate`1[[testapp.App, testapp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].FinishedLaunching(UIApplication application, NSDictionary launchOptions)

I have tried adding <ResolveAssemblyConflicts>true</ResolveAssemblyConflicts>, different linker settings, and downgrading the project to .net 6. All attempts failed with same error.

Environment

Visual Studio Community 2022 for Mac
Version 17.4.2 (build 17)
Installation UUID: 04eb36b5-8ade-4881-9f2c-f51e231033e1

Runtime
.NET 6.0.12 (64-bit)
Architecture: X64

Roslyn (Language Service)
4.4.0-6.22578.12+3c6ab8e1715e5b080fb7bb77070810ab71e09387

NuGet
Version: 6.3.1.1

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/7.0.101/Sdks
SDK Versions:
	7.0.101
	6.0.404
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	7.0.1
	6.0.12

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin.Android
Version: 13.1.0.1 (Visual Studio Community)
Commit: xamarin-android/d17-4/13ba222
Android SDK: /Users/jhimes/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		13.0 (API level 33)

SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 33.0.2
SDK Build Tools Version: 32.0.0

Build Information: 
Mono: a96bde9
Java.Interop: xamarin/java.interop/d17-4@fcc33ce2
SQLite: xamarin/sqlite/3.39.3@23e1ae7
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@0be567a

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.4.0.54
Hash: 6eabb9e
Branch: remotes/origin/d17-4
Build date: 2022-12-13 04:22:32 UTC

Android Device Manager
Version: 0.0.0.1206
Hash: 886af39
Branch: 886af39
Build date: 2022-12-13 04:22:32 UTC

Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18

Xamarin.Mac
Version: 9.0.0.27 (Visual Studio Community)
Hash: 933c6c2c9
Branch: xcode14.1
Build date: 2022-11-22 02:00:36-0500

Xamarin.iOS
Version: 16.1.1.27 (Visual Studio Community)
Hash: 933c6c2c9
Branch: xcode14.1
Build date: 2022-11-22 02:00:37-0500

Xamarin Designer
Version: 17.4.0.136
Hash: d49c9ff6d3
Branch: remotes/origin/d17-4
Build date: 2022-12-13 04:22:27 UTC

Build Information
Release ID: 1704020017
Git revision: 7ef5413f2eec3351ce648085f619fc29fd8cb647
Build date: 2022-12-13 04:20:10+00
Build branch: release-17.4
Build lane: release-17.4

Operating System
Mac OS X 12.6.1
Darwin 21.6.0 Darwin Kernel Version 21.6.0
    Thu Sep 29 20:12:57 PDT 2022
    root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64


Copied from original issue xamarin/xamarin-macios#17159

@rolfbjarne
Copy link
Member Author

From @rolfbjarne on Thu, 19 Jan 2023 15:12:23 GMT

I can reproduce this with the provided sample and running on an iOS device.

Using ILSpy on this method at Avalonia.OpenGL.GlBasicInfoInterface.GetStringNative(Int32 v) shows:

.field private method unmanaged stdcall native int *(int32) _addr_GetStringNative

.method public hidebysig 
	instance native int GetStringNative (
		int32 v
	) cil managed 
{
	.custom instance void Avalonia.SourceGenerator.GetProcAddressAttribute::.ctor(string) = (
		01 00 0b 67 6c 47 65 74 53 74 72 69 6e 67 00 00
	)
	// Method begins at RVA 0x2330
	// Header size: 12
	// Code size: 15 (0xf)
	.maxstack 2
	.locals init (
		[0] method unmanaged stdcall native int *(int32)
	)

	IL_0000: ldarg.0
	IL_0001: ldfld method unmanaged stdcall native int *(int32) Avalonia.OpenGL.GlBasicInfoInterface::_addr_GetStringNative
	IL_0006: stloc.0
	IL_0007: ldarg.1
	IL_0008: ldloc.0
	IL_0009: calli unmanaged stdcall native int(int32)
	IL_000e: ret
} // end of method GlBasicInfoInterface::GetStringNative

and nothing in particular stands out to me, so I'm moving to dotnet/runtime.

@ghost
Copy link

ghost commented Jan 19, 2023

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

From @jhimes144 on Sun, 08 Jan 2023 04:51:56 GMT

This is an issue I have raised over in Avalonia here AvaloniaUI/Avalonia#9934
To the best of our knowledge, the below method GetStringNative should not have any problem with AOT, and everything works fine on Android with AOT enabled. So far I've reproduced this on two separate code bases.

Steps to Reproduce

  1. Create a new dotnet solution using the Avalonia xplat template. See https://github.com/AvaloniaUI/avalonia-dotnet-templates
  2. Insert needed CodesignKey in project file for the ios project
  3. Build and run the ios project on a physical ios device

Expected Behavior

The app runs

Actual Behavior

The following exception is raised on app startup

System.ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) intptr Avalonia.OpenGL.GlBasicInfoInterface:wrapper_native_indirect_0x283931e40 (intptr&,int)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

  at Avalonia.OpenGL.GlBasicInfoInterface.GetStringNative(Int32 v) in /_/src/Avalonia.OpenGL/DevGenerators/Generator.GetProcAddressInitializationGenerator/globalAvalonia.OpenGL.GlBasicInfoInterface.cs:13
  at Avalonia.OpenGL.GlBasicInfoInterface.GetString(Int32 v) in /_/src/Avalonia.OpenGL/GlBasicInfoInterface.cs:27
  at Avalonia.OpenGL.GlBasicInfoInterface.GetExtensions() in /_/src/Avalonia.OpenGL/GlBasicInfoInterface.cs:43
  at Avalonia.OpenGL.GlInterface.GlContextInfo.Create(GlVersion version, Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlInterface.cs:33
  at Avalonia.OpenGL.GlInterface..ctor(GlVersion version, Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlInterface.cs:48
  at Avalonia.iOS.GlContext..ctor() in /_/src/iOS/Avalonia.iOS/EaglDisplay.cs:30
  at Avalonia.iOS.EaglFeature..ctor() in /_/src/iOS/Avalonia.iOS/EaglDisplay.cs:17
  at Avalonia.iOS.Platform.Register() in /_/src/iOS/Avalonia.iOS/Platform.cs:34
  at at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].Setup()
  at at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].SetupWithLifetime(IApplicationLifetime lifetime)
  at at Avalonia.iOS.AvaloniaAppDelegate`1[[testapp.App, testapp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].FinishedLaunching(UIApplication application, NSDictionary launchOptions)

I have tried adding <ResolveAssemblyConflicts>true</ResolveAssemblyConflicts>, different linker settings, and downgrading the project to .net 6. All attempts failed with same error.

Environment

Visual Studio Community 2022 for Mac
Version 17.4.2 (build 17)
Installation UUID: 04eb36b5-8ade-4881-9f2c-f51e231033e1

Runtime
.NET 6.0.12 (64-bit)
Architecture: X64

Roslyn (Language Service)
4.4.0-6.22578.12+3c6ab8e1715e5b080fb7bb77070810ab71e09387

NuGet
Version: 6.3.1.1

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/7.0.101/Sdks
SDK Versions:
	7.0.101
	6.0.404
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	7.0.1
	6.0.12

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin.Android
Version: 13.1.0.1 (Visual Studio Community)
Commit: xamarin-android/d17-4/13ba222
Android SDK: /Users/jhimes/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		13.0 (API level 33)

SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 33.0.2
SDK Build Tools Version: 32.0.0

Build Information: 
Mono: a96bde9
Java.Interop: xamarin/java.interop/d17-4@fcc33ce2
SQLite: xamarin/sqlite/3.39.3@23e1ae7
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@0be567a

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.4.0.54
Hash: 6eabb9e
Branch: remotes/origin/d17-4
Build date: 2022-12-13 04:22:32 UTC

Android Device Manager
Version: 0.0.0.1206
Hash: 886af39
Branch: 886af39
Build date: 2022-12-13 04:22:32 UTC

Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18

Xamarin.Mac
Version: 9.0.0.27 (Visual Studio Community)
Hash: 933c6c2c9
Branch: xcode14.1
Build date: 2022-11-22 02:00:36-0500

Xamarin.iOS
Version: 16.1.1.27 (Visual Studio Community)
Hash: 933c6c2c9
Branch: xcode14.1
Build date: 2022-11-22 02:00:37-0500

Xamarin Designer
Version: 17.4.0.136
Hash: d49c9ff6d3
Branch: remotes/origin/d17-4
Build date: 2022-12-13 04:22:27 UTC

Build Information
Release ID: 1704020017
Git revision: 7ef5413f2eec3351ce648085f619fc29fd8cb647
Build date: 2022-12-13 04:20:10+00
Build branch: release-17.4
Build lane: release-17.4

Operating System
Mac OS X 12.6.1
Darwin 21.6.0 Darwin Kernel Version 21.6.0
    Thu Sep 29 20:12:57 PDT 2022
    root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64


Copied from original issue xamarin/xamarin-macios#17159

Author: rolfbjarne
Assignees: -
Labels:

untriaged, area-Infrastructure-mono

Milestone: -

@steveisok
Copy link
Member

/cc @vargaz

@JayToltTech
Copy link

FYI, this makes 'hello world' on iOS fail. For me, this implies that .NET on iOS isn't anyone's priority, given that the most basic of apps fails to launch and it's not being investigated.

@jhimes144
Copy link

FYI, this makes 'hello world' on iOS fail. For me, this implies that .NET on iOS isn't anyone's priority, given that the most basic of apps fails to launch and it's not being investigated.

Yup. This issue hasn't received any activity for almost 4 months.

@steveisok
Copy link
Member

@jhimes144 on android, was full aot being used and you didn't hit this problem? If not, it's very likely the code path was still using jit.

@jhimes144
Copy link

@steveisok Full aot was/is being used on android and the problem is not encountered.

@vargaz
Copy link
Contributor

vargaz commented May 7, 2023

This particular code pattern, when a function pointer is returned from native code and later called using calli is not supported by full-aot, don't think it ever was. The reason is that the runtime needs to generate a managed-to-native wrapper to call the function pointer, and the wrapper needs to embed the address which is called which is a runtime constant, so it cannot be generated at AOT time.

Enabling the interpreter might fix the problem.

@jhimes144
Copy link

@maxkatz6 Tagging you here

@maxkatz6
Copy link
Contributor

maxkatz6 commented May 8, 2023

@vargaz thanks for the explanation.
To summarize, this scenario isn't supported in mono aot currently? I understand that function pointer isn't known in compile time, but it still possible to generate trampoline function with this runtime pointer and parameters.

Either way, we will look into possible workarounds.
But as far as I know the same approach is also used in other OpenGL wrappers for dotnet like Silk.NET

@maxkatz6
Copy link
Contributor

maxkatz6 commented May 8, 2023

Also, you are right about interpreter. In our tests it did solve the problem.

@vargaz
Copy link
Contributor

vargaz commented May 8, 2023

Testcase:

using System;

class Tests
{
	public static void Main () {
        unsafe {
            delegate* unmanaged<int, int> callbackProc = (delegate* unmanaged<int, int>)IntPtr.Zero;
            callbackProc (5);
        }
    }
}

@vargaz vargaz self-assigned this May 8, 2023
@vargaz
Copy link
Contributor

vargaz commented May 8, 2023

This looks fixable, will look into it.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 8, 2023
vargaz added a commit to vargaz/runtime that referenced this issue May 8, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 9, 2023
@JayToltTech
Copy link

FYI, my repo case was getting started with Avalonia on iOS following these steps:

https://docs.avaloniaui.net/tutorials/developing-for-mobile/create-a-cross-platform-solution

If this patch has made it into a public .NET 7 build on MacOS, I will try. Or if you can point me to the right doc to build/install a private build on MacOS, will try as well.

@steveisok
Copy link
Member

@SamMonoRT should we consider backporting #85923 to 7.0?

@SamMonoRT
Copy link
Member

@vargaz - not sure how much the code has deviated, but should be ok to backport the fix to 7.0 ?

@vargaz
Copy link
Contributor

vargaz commented May 18, 2023

It could be backported, it should be low risk.

@jhimes144
Copy link

@vargaz Thank you so much for looking into this.

I could find time at some point this week to attempt to get the daily build of .net to work with Avalonia to see if the issue is resolved. I'm also a huge fan of a backport. Thanks!

@JayToltTech
Copy link

Looking forward to starting to invest in .NET/Avalonia on iOS app development!

Appreciate the attention and effort, peoples.

@nref
Copy link

nref commented May 27, 2023

I came here from the linked issue in Avalonia. This issue is blocking my development of an iOS app using Avalonia. I'm stuck on NET 7 for now so a backport would be appreciated.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 31, 2023
@steveisok
Copy link
Member

@vargaz Thank you so much for looking into this.

I could find time at some point this week to attempt to get the daily build of .net to work with Avalonia to see if the issue is resolved. I'm also a huge fan of a backport. Thanks!

@jhimes144, were you able to try out a nightly to see if this fixes the issue?

@jhimes144
Copy link

@steveisok

I apologize, I have not had time to look into this yet. The boss man has thrown other priorities at me. It may be a week or two before I get back to this.

@nref
Copy link

nref commented Jun 6, 2023

@steveisok I can give it a try. How would I try the nightly? Installed dotnet-sdk-7.0.400-preview.23305.1-win-x64, rebuilt and deployed my iOS app, and it still has the crash. Do I need to rebuild Avalonia itself with the new runtime? Thanks.

@danmoseley
Copy link
Member

There are daily SDKs in https://github.com/dotnet/installer if that is what you need?

@nref
Copy link

nref commented Jun 6, 2023

@danmoseley Thanks for confirming, that is what I found and installed. Then when I deployed my Avalonia-based iOS app, I still go the crash.

So either the crash is unfixed, or I didn't deploy the new runtime, which led to my question, should I rebuild Avalonia too? Thanks!

@steveisok
Copy link
Member

@danmoseley Thanks for confirming, that is what I found and installed. Then when I deployed my Avalonia-based iOS app, I still go the crash.

So either the crash is unfixed, or I didn't deploy the new runtime, which led to my question, should I rebuild Avalonia too? Thanks!

We landed the fix in main, but the backport to 7 hasn't made it yet. Can you try a .net 8 nightly sdk instead?

@nref
Copy link

nref commented Jun 6, 2023

Having trouble building with net8.0.

Process so far:

  • Installed dotnet-sdk-8.0.100-preview.6.23305.4-win-x64.exe,
  • Restarted Visual Studio (a few times)
  • Changed TargetFramework from net7.0-ios to net8.0-ios. Didn't touch RuntimeIdentifier, that caused other errors.
  • Re-paired with the mac which then installed the matching runtime.
  • Re-paired again
  • Error 2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.8531-net8-p6\targets\Xamarin.Shared.Sdk.targets(1039,4): error MSB4057: The target "_ComputeManagedAssemblyToLink" does not exist in the project.

Googling around points to the linker. MTouchLink=None had no effect.
Out of time for now.

@vargaz
Copy link
Contributor

vargaz commented Jun 6, 2023

The backport PR is:
#86934

@rolfbjarne
Copy link
Member Author

rolfbjarne commented Jun 6, 2023

  • Error 2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.8531-net8-p6\targets\Xamarin.Shared.Sdk.targets(1039,4): error MSB4057: The target "_ComputeManagedAssemblyToLink" does not exist in the project.

I believe you can work around this by adding this to your csproj:

<PropertyGroup>
    <_RequiresILLinkPack>true</_RequiresILLinkPack>
</PropertyGroup>

@nref
Copy link

nref commented Jun 6, 2023

Thanks @rolfbjarne .

I added that and now am getting

2>C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.4.8531-net8-p6\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(321,3): error : The illink assembly doesn't exist: ''.

@rolfbjarne
Copy link
Member Author

@slater1 can you try directly from the Mac?

@nref
Copy link

nref commented Jun 6, 2023

Ok, sure. After following the steps below, on the mac a vanilla avalonia.xplat project builds and runs in the iOS simulator:

Steps:

  • Installed dotnet-sdk-8.0.100-preview.4.23260.5-osx-arm64.pkg on the mac, then:
dotnet new install Avalonia.Templates
dotnet new avalonia.xplat -o test
cd test
# manually update ./test.iOS/test.iOS.csproj TFM from `net7.0-iOS` to `net8.0-iOS`
sudo dotnet workload restore # installs iOS workload etc
dotnet build
dotnet run --project ./test.iOS

image

Not sure what this means for me using Visual Studio from Windows. Later today I can try this with a real iPhone.

kotlarmilos added a commit that referenced this issue Jun 9, 2023
… in full-aot mode. (#86934)

* [mono][aot] Generate 'native-indirect' wrappers in full-aot mode.

Fixes #80853.

* Add support for native_func_indirect wrapper type in append_mangled_wrapper and append_mangled_wrapper_subtype functions

---------

Co-authored-by: Zoltan Varga <[email protected]>
Co-authored-by: Milos Kotlar <[email protected]>
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 9, 2023
@DrWenz
Copy link

DrWenz commented Jun 21, 2023

i'm facing to the same problem since days, on Simulator it runs perfectly.
I need to put my app in AppStore, what can i do?

@nref
Copy link

nref commented Jun 21, 2023

@DrWenz One workaround is to use the mono interpreter.

  <PropertyGroup>
    <UseInterpreter>True</UseInterpreter>
  </PropertyGroup>

This worked for me to get my Avalonia iOS app running on real devices. Interpreter is slower sometimes than AOT so be sure to performance test your app.

@DrWenz
Copy link

DrWenz commented Jun 21, 2023

@DrWenz One workaround is to use the mono interpreter.

  <PropertyGroup>
    <UseInterpreter>True</UseInterpreter>
  </PropertyGroup>

This worked for me to get my Avalonia iOS app running on real devices. Interpreter is slower sometimes than AOT so be sure to performance test your app.

Thx @slater1 works like charm :) saved my day!

@SamMonoRT
Copy link
Member

Based on above comments and backported PR merging, closing this issue. Please re-open if you still encounter the crashes.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants