【问题标题】:Xamarin iOS c__AnonStorey1Xamarin iOS c__AnonStorey1
【发布时间】:2016-10-19 07:25:22
【问题描述】:

我检索了有关我的应用程序的崩溃日志。

System.NullReferenceExceptionObject reference not set to an instance of an object
Raw TouristApp.PuntiEventiView.c__AnonStorey1.<>m__0()
Foundation.NSActionDispatcher.Apply()
UIKit.UIApplication.UIApplicationMain(int, string[], intptr, intptr)(wrapper managed-to-native)
UIKit.UIApplication.Main(string[] args, IntPtr principal, IntPtr delegate)
UIKit.UIApplication.Main(string[] args, string principalClassName, string delegateClassName)
TouristApp.Application.Main(string[] args)

我对错误一无所知,在我的班级 (PuntiEventiView) 中没有调用 c__AnonStorey1.m(它似乎是一个 Mono 文件)。

有什么想法吗?

【问题讨论】:

    标签: ios xamarin mono


    【解决方案1】:

    逐步调试您的应用。您在某处使用匿名委托或 lambda 会导致 NULL ref 异常。

    c__AnonStorey1 是一个编译器生成的类,它捕获您的局部变量。

    (这里用我的水晶球猜,因为你没有显示任何代码)

    【讨论】:

    • 感谢您的回复。无法一步步调试(日志发送到 Xamarin Insight),但现在我有了一个想法。谢谢。关于代码:这是一个有 491 行并且对其他类有各种引用的类,所以我怀疑如果我发布该类的代码会有用。 :-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-23
    • 2015-10-31
    • 2018-08-03
    • 1970-01-01
    相关资源
    最近更新 更多