-
Notifications
You must be signed in to change notification settings - Fork 516
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 in release configuration #21737
Comments
The first step would be to get a better stack trace from the crash report; this can be accomplished by adding the following to your build command:
alternatively you can add it to the csproj like this: <PropertyGroup>
<NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup> Can you do that, get the resulting crash log and post it here? The stack trace should contain better frame names now. |
Hi! @rolfbjarne I've added the property group to
|
Yes, that's a better stack trace, something clearly goes wrong pretty early on. Does the crash still occur if you build the app like this?
that is, without setting |
Hey @rolfbjarne The issue could be with the added flags An interesting note, is that when a newly created project in .NET 9.0 MAUI is run with the command generated by VS code (with the flags), it works fine in Release. Let me know if there are more details you need from us, to further debug this! |
Possibly related? |
No, that's probably unrelated. You'll need to get some logs for that crash to try to figure out the underlying cause. |
The fact that you can't reproduce with a new project, but you can with your main project, means I'll need a way to reproduce this in order to figure out what's going on. Would it be possible for you to share your project with us? |
@rolfbjarne |
Hi @rolfbjarne Running the following command:
In the following project: |
Do you get the same stack trace with that test project? I get this, which is unrelated to what you reported originally:
|
Hi @jsabiometric. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Hi @jsabiometric. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you. |
Any news on this issue? I get some similiar issue in my project after upgrading to .NET 9 on iOS only: |
If you're running into an exception with "Attempting to JIT compile method ...", please file a new issue with a test project, each case is likely to be different. |
Apple platform
iOS
Framework version
net9.0-*
Affected platform version
.NET 9.0.100
Description
We're attempting to run our existing .NET maui project (originally created with .NET 7, later upgraded to .NET 8.0) after upgrading our machine to .NET 9.0, but we're experiencing crash on launch. Debug mode works without any issues.
When upgrading the project itself to
net9.0-ios
, we're still experiencing the crash when running in Release. We've ensured all of our dependancies are running on the latest version.On a machine with .NET 8.0, the project runs fine on both Debug and Release with project version
net8.0-ios
.Other observations:
Device: iPhone 15 Pro
Works on machine with:
.NET 8.0.201
Where project net version is
Does not work on machine with:
Where project net version is
Steps to Reproduce
We're currently reproducing it simply by
dotnet clean
dotnet build -t:Build -p:Configuration=Release -f net9.0-ios -r ios-arm64 -p:CustomAfterMicrosoftCSharpTargets="/Users/{name}/.vscode/extensions/ms-dotnettools.dotnet-maui-1.6.4-darwin-arm64/dist/resources/Custom.After.Microsoft.CSharp.targets" -p:MauiVSCodeBuildOutputFile="/var/folders/xr/cf5cx25n3kb0mjhmwqv8w6bxq1jrnl/T/dotnet-maui/maui-vsc-8e92a6e2-b4ec-4c9c-a9e1-3114090df4ef.json" -p:XamlTools="/Users/jsa/.vscode/extensions/ms-dotnettools.csharp-2.58.20-darwin-arm64/.xamlTools" /Users/jsa/Documents/Repositories/{repo_name}/{proj_name}/project.csproj
We haven't managed to reproduce it outside of our project, we've tried the following:
Did you find any workaround?
No, unfortunately not.
Relevant logs
Here are the crash logs:
The text was updated successfully, but these errors were encountered: