-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
iOS crashes on iossimulator-arm64 with OpenGLES rendering #14933
Comments
Can't reproduce here, error isn't as informative either. |
I have try it with "dotnet run" and it works perfectly. It runs the desktop app. I can't run it on ios though... The app crashes shows nothing on screen. |
@sotikouk "dotnet run" from the iOS project/folder, it shouldn't run desktop app from there. |
i have tried this also ... The result is exactly the same ... I believe that is a problem about the M1 apple processor... luckily i don't need the ios app for my job. |
Same here. We also use an M1 as build server. I am currently evaluating avalonia for a project, but I simply cannot get iOS to run. |
which Avalonia version? Anyone having a minimal sample and steps to reproduce? |
Create new AvaloniaUI XPAT project for C# using
Visual Studio System Info:
I created 3 repros here: |
@gentledepp what XCode version and iOS simulator version are you using? |
XCode 15.3, I do not think we are hitting dotnet/runtime#98941, because
We just updated our build server, because as of April 29th, we cannot sip iOS Apps anymore if not built with iOS 17 SDK, that comes with XCode 15. So porting back is no option I'm afraid. Sidenote: |
I thought that one is not allowed to build an iOS app using Windows? Afaik this is an Apple limitation which we cannot solve. You can scan the internet for several blogs complaining about this, for example: https://stackoverflow.com/questions/40587265/react-native-how-to-build-for-ios-from-windows |
It is supported (kind of) just for development purposes and id also works with AvaloniaUI. see here: https://learn.microsoft.com/en-us/dotnet/maui/ios/hot-restart?view=net-maui-8.0 I apologize for not being specific enough. |
We now updated from XCode/Simulator from 15.3 to 15.4 - still the very same issue. Is anybody investigating this? |
I played around with the sample solutions of [AvaloniaHybrid] The AvaloniaMauiHybrid MauiSample can be deployed and started just fine on iOS. (XCode 15.3, Simulator 15.3, iOS SDK 17.4) (To be honest, though, since updating to XCode 15.4, Simulatore 15.4 and iOS SDK 17.5 as well as updating VS 17.9.7
If I run the AvaloniaMauiHybrid AvaloniaSymple.iOS I get the very same crash as reported above. Interestingly, having configured the VS debugger to stop on all exceptions, before the crash I get a weird "System.IO.FileNotFoundException: ''" The stack trace is
|
@gentledepp you can try to disable MAUI/Xamarin Hot Reload in Visual Studio. But that exception is likely unrelated to the original problem. For me personally switching from "iossimulator-arm64" (which is used by default) to "iossimulator-x64" has fixed simulator problem with 17.2-17.5. |
I'll try that out fist thing on tuesday when I am back in the office. Thank you so much! |
@maxkatz6 I am really sorry for having to ask that, but where exactly do I change the iossimulator? |
Opened two issues |
like this? add <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE> in my .csproj and vscode builds it for iossimulator-x64 |
I should have mentioned that. Just add: Alternatively, if you build from command line, you can use |
I actually didn't know about this property. If it works for you, that's great. |
no - it had no effect whatsoever |
this did not help neither :-| |
I've also encountered this issue on an M3 Pro MacBook Pro, dotnet 8.0.300, XCode 15.4. Adding
Seems like this might be related to an XCode issue though. |
As per xamarin/xamarin-macios#20657, it seems to be a bug in iOS Apple simulator. And might be worked-around by using Metal rendering instead of OpenGL:
in the AppBuilder |
I will verify this tomorrow in the office and ping back here |
How do you use the AppBuilder with iOS? The xplat template uses |
Switching to Metal Rendering doesn't seem to stop the crashing. Only adding AppDelegate.cs
csproj
|
|
I have to apologize: I overlooked a very important part of @daniel-carr-3000 s comment:
@maxkatz6 I guess this information should be made as public as possible, since a bunch of devs that try out avaloniaui on iOS will face this right away. |
Btw I think this is also fixed with pinning .net to 8.0.301 and also switching to Metal. No crash anymore even without trick of runtime identifier 🎉🎉🎉 |
11.2 has metal enabled by default. And we should make it default for 11.1.1 (unfortunately, too late for 11.1.0, I think, will double check). |
Backport of 11.2 changes into 11.1. See #14933 (comment)
Another hack on how to enable
|
Backport of 11.2 changes into 11.1. See #14933 (comment)
Closing this issue, as OpenGL and Simulator related bugs should be resolved now. |
Describe the bug
Its my first AvaloniaUI mobile app. I use Rider while the app runs on every other platform (desktop, android) on ios it crashes.
This is the output of run :
Exiting early due to double fault.
To Reproduce
open a new project in Rider.
Run or Debug the application in ios.
Expected behavior
Expected to run on ios.
Avalonia version
1.3.0
OS
Mac OS
Additional context
No response
The text was updated successfully, but these errors were encountered: