-
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
MAUI iOS Release mode crash: Attempting to JIT compile method '(wrapper delegate-invoke) bool <Module>:invoke_callvirt_bool_SafeHandleZeroOrMinusOneIsInvalid (Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid)' while running in aot-only mode #83212
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsDescriptionI am getting crash on iOS in Release mode with below stack trace: System.Linq.Expressions.Interpreter.FuncCallInstruction Steps to ReproduceI am getting crash on iOS in Release mode with below stack trace: System.Linq.Expressions.Interpreter.FuncCallInstruction Link to public reproduction project repositoryn/a Version with bug7.0 (current) Last version that worked wellUnknown/Other Affected platformsiOS Affected platform versionsiOS 16 Did you find any workaround?N/A Relevant log outputN/A
|
Tagging subscribers to this area: @cston Issue DetailsDescriptionI am getting crash on iOS in Release mode with below stack trace: System.Linq.Expressions.Interpreter.FuncCallInstruction Steps to ReproduceI am getting crash on iOS in Release mode with below stack trace: System.Linq.Expressions.Interpreter.FuncCallInstruction Link to public reproduction project repositoryn/a Version with bug7.0 (current) Last version that worked wellUnknown/Other Affected platformsiOS Affected platform versionsiOS 16 Did you find any workaround?N/A Relevant log outputN/A
|
Should be fixed by #83329 |
Until this is fixed, you can try adding |
@LeVladIonescu Can you please let me know in which section of the csproj file shall I add this "UseInterpreter" entry or some kind of screenshot for same. Also one thing to ask is this acceptable workaround which enterprise apps/developers are in general use to fix this crash? Regards. |
Just put the property in a
|
Thanks @LeVladIonescu for the clarification. I was thinking only add for iOS Release property group like below:
|
Also for some part code I get this exception: Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target) The exception stack trace is as below: Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target) So, I guess this is also iOS AOT issue. Regards. |
It is also okay like that, it does the same. By that you will have enabled
Regarding this, yes, it is an AOT issue as it tries to execute that |
@LeVladIonescu Many Thanks for above clarification. Will await for the fix in .Net 8.0 framework version and meanwhile will use the workaround and check if all is good. Regards. |
@muffadal53 This should be fixed by #85643. |
@muffadal53 - Closing this issue as Fixed. If you still hit the issue after .NET8 Preview 7 build or later, please re-open again. |
Description
I am getting crash on iOS in Release mode with below stack trace:
System.Linq.Expressions.Interpreter.FuncCallInstruction
2[[Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(InterpretedFrame ) System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame ) System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] ) System.Dynamic.Utils.DelegateHelpers.FuncThunk1[Object,Object](Func
2 handler, Object t1)Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target)
Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Type type, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.SerializeObject(Object value)
Steps to Reproduce
I am getting crash on iOS in Release mode with below stack trace:
System.Linq.Expressions.Interpreter.FuncCallInstruction
2[[Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(InterpretedFrame ) System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame ) System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] ) System.Dynamic.Utils.DelegateHelpers.FuncThunk1[Object,Object](Func
2 handler, Object t1)Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target)
Newtonsoft.Json.Serialization.ExpressionValueProvider.GetValue(Object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Type type, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.SerializeObject(Object value)
Link to public reproduction project repository
n/a
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16
Did you find any workaround?
N/A
Relevant log output
The text was updated successfully, but these errors were encountered: