Xamarin.ios 输入文本时,具有RefreshRequested和EntryElement的DialogViewController崩溃

Xamarin.ios 输入文本时,具有RefreshRequested和EntryElement的DialogViewController崩溃,xamarin.ios,monotouch.dialog,Xamarin.ios,Monotouch.dialog,DialogViewController包含EntryElement,并且设置了RefreshRequested处理程序(请参见下面的代码)。 在模拟器中运行,调试模式,在EntryElement中键入一些快速随机文本(包含空格)。随后将发生崩溃 我做错了什么 我猜这是DialogViewController中的一个bug,它没有保留一些垃圾收集的图像。 是否有跟踪垃圾收集器和已删除对象的开关 违规代码: [Register ("AppDelegate")] public partial cla

DialogViewController包含EntryElement,并且设置了RefreshRequested处理程序(请参见下面的代码)。 在模拟器中运行,调试模式,在EntryElement中键入一些快速随机文本(包含空格)。随后将发生崩溃

我做错了什么

我猜这是DialogViewController中的一个bug,它没有保留一些垃圾收集的图像。 是否有跟踪垃圾收集器和已删除对象的开关

违规代码:

[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
    // class-level declarations
    UIWindow window;
    UINavigationController navController;
    DialogViewController dv ;


    public override bool FinishedLaunching (UIApplication app, NSDictionary options)
    {
        // create a new window instance based on the screen size
        window = new UIWindow (UIScreen.MainScreen.Bounds);

        navController = new UINavigationController();
        var root = new RootElement("Test") {
            new Section("Quick type some text") {
                new EntryElement("that contains spaces", string.Empty, string.Empty)
            }
        };

        dv = new DialogViewController(root, true);
        dv.RefreshRequested += HandleDvRefreshRequested; // comment this line fixes the bug
        window.MakeKeyAndVisible ();


        if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0)) {
            window.RootViewController = navController;
        } else {
            window.AddSubview (navController.View);
        }

        return true;
    }

    void HandleDvRefreshRequested (object sender, EventArgs e)
    {
       dv.ReloadComplete();
    }
}
================================================================= 在执行本机代码时收到SIGSEGV。这通常表明 mono运行时或某个本机库中出现致命错误 由您的应用程序使用。 =================================================================
这是一个“自动更正”的例子,它是单触式的

有些东西,在内心深处,模拟的iOS被破坏并显示出来,而它想画一条小红线来显示拼写错误的东西

只有当
UITextField
启用自动校正时,才会在模拟器中发生这种情况。像这样关闭它:

new EntryElement("that contains spaces", string.Empty, string.Empty) {
    AutocorrectionType = UITextAutocorrectionType.No
}

将解决这个问题(并且您只能使用
#define
)对您的模拟器版本执行此操作)。

这是一个
自动更正的案例,也称为bug>(以及相当多的副本),并且是单触式的

有些东西,在内心深处,模拟的iOS被破坏并显示出来,而它想画一条小红线来显示拼写错误的东西

只有当
UITextField
启用自动校正时,才会在模拟器中发生这种情况。像这样关闭它:

new EntryElement("that contains spaces", string.Empty, string.Empty) {
    AutocorrectionType = UITextAutocorrectionType.No
}

将解决这个问题(并且您只能对带有
#define
的模拟器版本执行此操作)。

错误已报告为Yep,我认为它在此处具有更高的可见性。错误已报告为Yep,我认为它在此处具有更高的可见性。 ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. =================================================================
new EntryElement("that contains spaces", string.Empty, string.Empty) {
    AutocorrectionType = UITextAutocorrectionType.No
}