-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Android] Crash on startup after enabling LLVM #104163
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
Does this happen specifically within your app? Does it happen with a new MAUI UI Template app? Does it happen on a dotnet Android ( |
@drasticactions: clean new sample app seems to work with LLVM enabled. |
Verified this original issue with Visual Studio 17.11.0 Preview 2.0 (8.0.60 & 8.0.3 ). Cannot repro it on android |
I installed VS 17.11.0 Preview 2.0. Was able to repro with 8.0.60. Attempted to install 9.0.0-preview.5.24307.10 and had a bunch of unresolved resources and namespaces when compiling for Android... which I didn't have time to work through so I gave up on that. tldr, it still repros with the latest VS preview. |
@jonathanpeppers any thoughts? |
I think we can move this to runtime. @mfeingol you might see if you can get a more detailed log with:
Later, when you want to disable the logging, call |
@mfeingol can you please provide a repro and logs (if possible) so that we can investigate further? |
@jonathanpeppers, @steveisok: sorry for the delay. Here's a log of the crash: If you need a repro, I can grant you access to my project. |
Yeah, we're going to need one. Really tough to tell why even from the logs you posted. |
Okay. Who should I add? |
Doing another pass through the log, I do think you hitting the assertion is significant:
|
This is a duplication of #95406 |
@fanyang-mono: thanks! So I take it:
|
There may be multiple opportunities to reproduce. I suspect yours might be the easiest. We'll see what's wrong and try to work a fix. |
@steveisok: I've invited the three of you to my repo. Pull down https://github.com/mfeingol/sideroads/tree/maui and update the project to build release with LLVM enabled. You should see the crash in an emulator at app startup. |
@steveisok: any luck reproducing this? Thanks. |
@mfeingol yeah! We found that our LLVM had function specialization turned on and that messed with our expected mono EH code range. That problem results in the crash you are seeing. We have fixes for LLVM 16 (.NET 8) and LLVM 19 (.NET 9). The .NET 8 one needs to be shepherded through to make our servicing release. Here's the .NET 8 fix: dotnet/llvm-project#599 |
Description
tldr my release build works fine but when I enable LLVM it crashes on startup.
Might relate to #95406
Steps to Reproduce
This seems to do it:
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14
Did you find any workaround?
Don't use LLVM
Relevant log output
The text was updated successfully, but these errors were encountered: