-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Release System.ExecutionEngineException Blazor Hybrid iOS ComponentProperties.SetProperties(in ParameterView, object)+SetProperty(object, PropertySetter, string, object) #74015
Comments
@lewing Do you know what might be going on here? |
I believe these are related. Assuming the compiler is acting differently in Release than it is Debug |
Tagging subscribers to this area: @dotnet/area-system-componentmodel Issue DetailsDescriptionhaving a Release only issue with Components on MAUI Blazor Hybrid. Starting getting this error after pushing my app to the App Store. Apparently the testers set it off nearly a hundred times in 10 minutes. System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) void :invoke_callvirt_void_BindableT ?, in void PropertySetter.CallPropertySetter<BindableT, string>(Action<BindableT, string> setter, object target, object value) ?, in void ComponentProperties.SetProperties(in ParameterView, object)+SetProperty(object, PropertySetter, string, object) Steps to ReproduceRun New MAUI Hybrid app in release, set properties on a component that uses Generics for implementation. Version with bug6.0.486 (current) Last version that worked wellUnknown/Other Affected platformsiOS, macOS Affected platform versionsiOS 15.5 is what I’ve seen so far. Did you find any workaround?No Relevant log outputNo response
|
Moving to runtime because this problem appears to be specific to AOT. |
I believe the problem here is that ASP.NET is creating generic delegates here which requires JIT. @agocke is there something that ASP.NET Or the application can do to tell the AOT tooling to pre-generate this delegate? |
This is Mono AOT. Re-pathed to there. |
""Attempting to JIT compile method METHOD NAME while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information."" I think we addressed a similar issue before ? |
cc @rolfbjarne fyi |
@SamMonoRT there are numerous other open issues due to the same exception, but each case usually needs investigation to figure out the underlying cause (they're not all the same). FWIW maybe it would help if the AOT compiler emitted a warning when it can't AOT compile a method, explaining why? And in that case we could just ask for a build log, and match the stack trace to a method in a warning. |
Just chiming in here. I am getting the same error when using Telerik's Blazor libraries in a Blazor Hybrid application. Everything works on simulators (and my new app is already in the Google Play Store), except on a real iOS device. I would be more than happy to give more details if required. I've contacted Telerik about this, but I doubt they can do anything as this seems to be a MAUI issue. |
After many tears, I found that this fixed my issue:
I also added a bunch of --linkskip arguments to MtouchExtraArgs for things like the Telerik library, my Razor library the MAUI app shares with Blazor Server app, as well as AutoMapper for good measure. Not sure if these did anything, but I ain't changing nothing now that I got it working. |
Use Interpreter did nothing for me. What're the Linkship and MtoichExtraArgs things you did? |
@Kylar182 I am trying to reproduce this issue and find out what the AOT compiler is doing. Can you give me a minimal repro? Like, of I start with |
From the stack trace it looks like you then need to make a razor page that has some components on them that will have the That function evidently uses reflection to set component parameter properties, which will then fail since we can't AOT those kind of reflection-heavy code I don't know enough about Razor to say how to make a page & components that will have SetParametersAsync called on them. but it should be possible to make a relatively concise repro. this is fundamentally not AOT-friendly code |
@Kylar182 I did a linkskip on both my own Razor library and the UI library I was using, in this case Telerik. |
@SteveSandersonMS Might you know how I can construct a program with Component that has SetParametersAsync called on it? I'm not that familiar with this stuff. |
@naricc in this issue (already related) you can find a minimal repo to try: |
I'm in the middle of some timely feature deliveries on a couple other applications but I'll be able too in a couple weeks. I think on issue with that is that you'll need your own iOS deployment set up for pushing to Test Flight. |
I believe this is likely a related issue because using his work around worked for me as well. On the App Store now. |
@LeVladIonescu - this is similar to other issue in your queue. Please take a look. |
@vargaz - moved this to 9.0.0, but any suggestions here? |
I think this is a dup of: |
This should be fixed by #85643. |
@Kylar182 please re-open it if you still encounter the issue with .NET8. |
Description
having a Release only issue with Components on MAUI Blazor Hybrid. Starting getting this error after pushing my app to the App Store. Apparently the testers set it off nearly a hundred times in 10 minutes.
Steps to Reproduce
Run New MAUI Hybrid app in release, set properties on a component that uses Generics for implementation.
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS 15.5 is what I’ve seen so far.
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: