.NET MAUI应用曾正常运行,现启动后崩溃及异常问题求助
.NET MAUI应用启动崩溃问题求助
我的.NET MAUI应用此前运行正常,一周前重新打开后出现崩溃问题。起初报‘circular dependancy’运行时错误,之后触发System.ArgumentNullException异常,现在应用启动后显示黑屏,数秒后直接崩溃且无任何错误提示。
此前捕获的System.ArgumentNullException异常信息如下:
System.ArgumentNullException: Value cannot be null. (Parameter 'key') at System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryInsert(String key, Object value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Add(String key, Object value) at Registrar.DynamicRegistrar.SetAssemblyRegistered(String assembly) at ObjCRuntime.Class.Initialize(InitializationOptions* options) at ObjCRuntime.Runtime.Initialize(InitializationOptions* options)
已尝试的排查操作:
- 重启电脑及测试环境
- 重新下载安装Visual Studio
- 注释掉Shell导航相关代码(怀疑错误与数据/对象传递有关),代码如下:
await Shell.Current.GoToAsync("/RecipeDetailsPage", true, new Dictionary<string, object> { {"Recipe", recipe} });
异常抛出时未指向我的任何业务文件。
内容的提问来源于stack exchange,提问作者Excal
相关产品推荐
相关产品推荐

