1

我一直在尝试使用 ServiceStack.Text.JsConfig.RegisterTypeForAot(); 在运行时不用于解决我的 AOT 问题的方法中,但是当我调用它时遇到了其他奇怪的问题。我有 10 次调用各种类型,包括类、结构和枚举。当我有 9 个电话时,一切正常,我已经改变了一些类型,所以我很确定它是数字。当我有 10 个电话时,我得到...

Stacktrace:

  at System.MonoType.ToString () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoType.cs:636
  at System.Exception.get_ClassName () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Exception.cs:141
  at System.Exception.ToString () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Exception.cs:286
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
  at System.Type.Equals (System.Type) [0x00020] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Type.cs:471
  at System.Type.IsAssignableFrom (System.Type) [0x00008] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Type.cs:863
  at System.Collections.Generic.EqualityComparer`1<intptr>..cctor () [0x00029] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/EqualityComparer.cs:42
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
  at System.Collections.Generic.Dictionary`2<intptr, System.WeakReference>.Init (int,System.Collections.Generic.IEqualityComparer`1<intptr>) [0x00012] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:265
  at System.Collections.Generic.Dictionary`2<intptr, System.WeakReference>..ctor () [0x00006] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:223
  at MonoTouch.ObjCRuntime.Runtime..cctor () <IL 0x00000, 0x0002b>
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    0   TouchContainer                      0x028dbda5 mono_handle_native_sigsegv + 244
    1   TouchContainer                      0x028a3cfd mono_sigsegv_signal_handler + 172
    2   libsystem_c.dylib                   0x320e8e93 _sigtramp + 42
    3   TouchContainer                      0x0093aa25 ServiceStack_Text_Common_JsWriter_WriteEnumFlags_System_IO_TextWriter_object + 381

=================================================================
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.
=================================================================

TouchContainer 是应用程序的名称。

这似乎发生在应用程序运行的早期,它一定是 AOT 中的错误或发出错误代码的东西。

有没有人有任何想法?我应该在 Xamarin 上记录一张票吗?看起来制作一个小型复制项目可能会很棘手......

4

1 回答 1

1

Rolf 建议(在错误评论中)将 -f 添加到 monotouch 参数中。这似乎已经解决了。

于 2012-12-11T21:56:10.737 回答