You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET MAUI操作ObservableRangeCollection时遭Watchdog终止崩溃

.NET MAUI iOS真机闪退排查问题

问题现象

  • iOS模拟器运行正常,iPhone 14 Pro Max发布部署后操作中突然闪退,闪退场景均涉及ObservableRangeCollection的元素添加或修改:
    • 向EF Core数据库和绑定到CollectionView的ObservableRangeCollection添加新项
    • 修改元素标记以更新ObservableRangeCollection,控制视图元素显示/隐藏
  • 额外发现:打开/关闭包含ToggleButton的BottomSheet且选择元素时,内存占用持续增长;未选择元素时内存保持稳定

崩溃信息(来自Sentry)

WatchdogTermination: The OS watchdog terminated your app, possibly because it overused RAM.

绑定诊断错误(Sentry面包屑)

Microsoft.Maui.Controls.Xaml.Diagnostics.BindingDiagnostics
'Max' property not found on 'MyApp.ViewModels.CalculateViewModel', target property: 'Microsoft.Maui.Controls.Entry.Text'

排查工具使用异常

  • dotnet-trace:PowerShell中执行命令失败,提示命令未被识别
  • mlaunch(Windows环境):执行时抛出异常
error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.TypeInitializationException: Der Typeninitialisierer für "AppKit.NSApplication" hat eine Ausnahme verursacht. ---> System.TypeInitializationException: Der Typeninitialisierer für "ObjCRuntime.Selector" hat eine Ausnahme verursacht. ---> System.DllNotFoundException: Die DLL "/usr/lib/libobjc.dylib": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.
  • dotnet-dsrouter:连接真机时失败,无法加载CoreFoundation DLL
fail: dotnet-dsrouter-15156[0]
      Failed running subscribe loop: Unable to load DLL '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation' or one of its dependencies: Das angegebene Modul wurde nicht gefunden. (0x8007007E). Disabling detection of devices connected over USB.

内容的提问来源于stack exchange,提问作者OXO

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 12:57:46