私がバインドしている次のプロパティがあります。
@property (nonatomic, readwrite, retain) NSArray* activeTasks;
次のコードでバインドします。
[Export("activeTasks", ArgumentSemantic.Retain)]
NSDictionary[] ActiveTasks { get; }
私はこのプロパティを頻繁に使用します。それでも、1,000 回のアクセスごとに、get_activeTasks (セレクターのバインディング) で SIGSEGV を取得します。私は何が間違っているのか、なぜこれが体系的ではなく非常にまれにしか起こらないのだろうか.
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) <IL 0x00024, 0xffffffff>
at MonoTouch.Foundation.NSObject.InitializeObject (bool) [0x00062] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:136
at MonoTouch.Foundation.NSObject..ctor (intptr,bool) [0x0000d] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:62
at MonoTouch.Foundation.NSObject..ctor (intptr) <IL 0x00003, 0x0002b>
at MonoTouch.Foundation.NSDictionary..ctor (intptr) <IL 0x00002, 0x00027>
at MonoTouch.Foundation.NSMutableDictionary..ctor (intptr) <IL 0x00002, 0x00027>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___intptr (object,intptr,intptr,intptr) <IL 0x00054, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <IL 0x00030, 0xffffffff>
at System.Reflection.MonoCMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00109] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:536
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:551
at System.Activator.CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[]) [0x00174] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:299
at System.Activator.CreateInstance (System.Type,object[],object[]) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:234
at System.Activator.CreateInstance (System.Type,object[]) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:229
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (intptr,intptr) [0x0000d] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:210
at MonoTouch.ObjCRuntime.Runtime.GetNSObject (intptr) [0x0001f] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:259
at MonoTouch.Foundation.NSArray.ArrayFromHandle<T> (intptr) [0x0003a] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSArray.cs:172
at TouchDBBinding.CouchServer.get_ActiveTasks () <IL 0x0001b, 0x00073>
編集:
これは、新しいフレームワークを使用した更新スタック トレースです。これがさらに役立つかどうかはわかりません。
スタックトレース:
at (wrapper managed-to-native) MonoTouch.Foundation.NSObject.monotouch_create_managed_ref (intptr,intptr,bool) <IL 0x0002d, 0xffffffff>
at MonoTouch.Foundation.NSObject.CreateManagedRef (bool) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:93
at MonoTouch.Foundation.NSObject.InitializeObject (bool) [0x000cc] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:88
at MonoTouch.Foundation.NSObject..ctor (intptr,bool) [0x0000d] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSObject2.cs:85
at MonoTouch.Foundation.NSObject..ctor (intptr) <IL 0x00003, 0x0002b>
at MonoTouch.Foundation.NSDictionary..ctor (intptr) <IL 0x00002, 0x00027>
at MonoTouch.Foundation.NSMutableDictionary..ctor (intptr) <IL 0x00002, 0x00027>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___intptr (object,intptr,intptr,intptr) <IL 0x00054, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <IL 0x00030, 0xffffffff>
at System.Reflection.MonoCMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00109] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:530
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:545
at System.Reflection.ConstructorInfo.Invoke (object[]) [0x0000e] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (intptr,intptr) [0x00051] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:269
at MonoTouch.ObjCRuntime.Runtime.GetNSObject (intptr) [0x0001f] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:328
at MonoTouch.Foundation.NSArray.ArrayFromHandle<T> (intptr) [0x00044] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSArray.cs:188
at TouchDBBinding.CouchServer.get_ActiveTasks () <IL 0x0001b, 0x00073>
保持する NSArray* が NSDictionary[] にバインドされ、このプロパティが null である場合に、MonoTouch の内部動作に問題が発生する可能性はありますか? それとも、null コンテンツが原因である可能性はありますか?
ありがとう、ポール