gpt4 book ai didi

ios - MonoTouch 在设备上随机崩溃,而不是在模拟器上

转载 作者:行者123 更新时间:2023-12-04 20:17:30 26 4
gpt4 key购买 nike

我认为这与内存有关,但我已经做了我能想到的一切。我已经确保类是已处置的属性(property)。在类级别而不是函数范围内维护硬引用,用于在我使用它们时可能会被 GC 处理的事物等。

基本上,该应用程序在模拟器中运行良好,但在真实设备上的同一位置崩溃。似乎我得到了几个不同的堆栈,但它们都在同一个地方。

我在我的应用程序中使用了大量事件。线程太多?

Stacktrace:

at Newtonsoft.Json.JsonWriter.WriteValue (object) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.WriteMemberInfoProperty (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.Utilities.IWrappedCollection,Newtonsoft.Json.Serialization.JsonArrayContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.WriteMemberInfoProperty (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter,object) at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter,object) at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter,object) at RestSharp.Serializers.JsonSerializer.Serialize (object) [0x0001c] in /Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/Serializers/JsonSerializer.cs:64 at RestSharp.RestRequest.AddBody (object,string) [0x00019] in /Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/RestRequest.cs:203 at RestSharp.RestRequest.AddBody (object) [0x00000] in /Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/RestRequest.cs:232 at TrackAboutMonoCore.Services.TrackAboutAPIRequestBuilder/TARestRequest.WithBody (T) <0x00097> at TrackAboutMonoCore.Services.ActionsService.CustomerSetVolume (int,System.Collections.Generic.List1<TrackAboutMonoCore.Models.Asset>,System.Action1>) [0x00000] in /Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutMonoCore/Services/ActionsService.cs:24 at TrackAboutMonoCore.Controllers.LocateController.Save (object,System.EventArgs) [0x00055] in /Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutMonoCore/Controllers/LocateController.cs:64 at MonoTouch.UIKit.UIBarButtonItem/Callback.Call (MonoTouch.Foundation.NSObject) [0x00010] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIBarButtonItem.cs:23 at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff> at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 at TrackAboutIOS.Application.Main (string[]) [0x00000] in /Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutIOS/TrackAboutIOS/Main.cs:16 at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

0 TrackAboutIOS 0x01d20618 mono_handle_native_sigsegv + 280 1 TrackAboutIOS
0x01d45bd4 sigabrt_signal_handler + 180 2 libsystem_c.dylib
0x376647ed _sigtramp + 48 3 libsystem_c.dylib
0x3765a20f pthread_kill + 54 4 libsystem_c.dylib
0x3765329f abort + 94 5 TrackAboutIOS
0x01e394ac monoeg_g_log + 208 6 TrackAboutIOS
0x01d11664 get_numerous_trampoline + 160 7 TrackAboutIOS
0x01d11aac mono_aot_get_imt_thunk + 56 8 TrackAboutIOS
0x01dbdc50 initialize_imt_slot + 112 9 TrackAboutIOS
0x01dbf1c4 build_imt_slots + 1124 10 TrackAboutIOS
0x01dbf32c mono_vtable_build_imt_slot + 120 11 TrackAboutIOS
0x01d236fc mono_convert_imt_slot_to_vtable_slot + 292 12 TrackAboutIOS 0x01d23974 common_call_trampoline + 284 13 TrackAboutIOS 0x01d21c60 mono_vcall_trampoline + 228 14 TrackAboutIOS
0x00934198 generic_trampoline_vcall + 136 15 TrackAboutIOS
0x00b9fec4 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1116 16 TrackAboutIOS 0x00ba13bc Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_WriteMemberInfoProperty_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1712 17 TrackAboutIOS 0x00ba2a70 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeObject_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonObjectContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1784 18 TrackAboutIOS 0x00ba0124 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1724 19 TrackAboutIOS 0x00ba3ec0 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeList_Newtonsoft_Json_JsonWriter_Newtonsoft_Json_Utilities_IWrappedCollection_Newtonsoft_Json_Serialization_JsonArrayContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 2520 20 TrackAboutIOS 0x00ba041c Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 2484 21 TrackAboutIOS 0x00ba13bc Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_WriteMemberInfoProperty_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1712 22 TrackAboutIOS 0x00ba2a70 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeObject_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonObjectContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1784 23 TrackAboutIOS 0x00ba0124 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1724 24 TrackAboutIOS 0x00b9f70c Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_Serialize_Newtonsoft_Json_JsonWriter_object + 356 25 TrackAboutIOS 0x00b2c52c Newtonsoft_Json_JsonSerializer_SerializeInternal_Newtonsoft_Json_JsonWriter_object + 300 26 TrackAboutIOS 0x00b2c3b4 Newtonsoft_Json_JsonSerializer_Serialize_Newtonsoft_Json_JsonWriter_object + 156 27 TrackAboutIOS 0x012010c0 RestSharp_Serializers_JsonSerializer_Serialize_object + 452 28 TrackAboutIOS 0x011f8ad0 RestSharp_RestRequest_AddBody_object_string + 396 29 TrackAboutIOS
0x011f8e4c RestSharp_RestRequest_AddBody_object + 152 30 TrackAboutIOS 0x011d3c64 TrackAboutMonoCore_Services_TrackAboutAPIRequestBuilder_TARestRequest_WithBody_T_T + 152 31 TrackAboutIOS 0x011d22d4 TrackAboutMonoCore_Services_ActionsService_CustomerSetVolume_int_System_Collections_Generic_List_1_TrackAboutMonoCore_Models_Asset_System_Action_1_RestSharp_RestResponse_1_TrackAbout_Rest_Models_TARestResponse + 328 32 TrackAboutIOS 0x011ce3bc TrackAboutMonoCore_Controllers_LocateController_Save_object_System_EventArgs + 960 33 TrackAboutIOS 0x0139003c MonoTouch_UIKit_UIBarButtonItem_Callback_Call_MonoTouch_Foundation_NSObject + 96 34 TrackAboutIOS 0x008b0450 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200 35 TrackAboutIOS 0x01d05834 mono_jit_runtime_invoke + 1644 36 TrackAboutIOS
0x01dbd09c mono_runtime_invoke + 128 37 TrackAboutIOS
0x01e4c054 monotouch_trampoline + 3436 38 CoreFoundation
0x30c7f3fd -[NSObject performSelector:withObject:withObject:] + 52 39 UIKit 0x3353efaf -[UIApplication sendAction:to:from:forEvent:] + 62 40 UIKit
0x3360476b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118 41 CoreFoundation 0x30c7f3fd -[NSObject performSelector:withObject:withObject:] + 52 42 UIKit
0x3353efaf -[UIApplication sendAction:to:from:forEvent:] + 62 43 UIKit 0x3353ef6b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30 44 UIKit
0x3353ef49 -[UIControl sendAction:to:forEvent:] + 44 45 UIKit
0x3353ecb9 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492 46 UIKit 0x3353f5f1 -[UIControl touchesEnded:withEvent:] + 476 47 UIKit
0x3353dad3 -[UIWindow _sendTouchesForEvent:] + 318 48 UIKit
0x3353d4c1 -[UIWindow sendEvent:] + 380 49 UIKit
0x3352383d -[UIApplication sendEvent:] + 356 50 UIKit
0x335230e3 _UIApplicationHandleEvent + 5826 51 GraphicsServices
0x33e1322b PurpleEventCallback + 882 52 CoreFoundation
0x30cf9523 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 38 53 CoreFoundation 0x30cf94c5 CFRunLoopDoSource1 + 140 54 CoreFoundation 0x30cf8313 __CFRunLoopRun + 1370 55 CoreFoundation
0x30c7b4a5 CFRunLoopRunSpecific + 300 56 CoreFoundation
0x30c7b36d CFRunLoopRunInMode + 104 57 GraphicsServices
0x33e12439 GSEventRunModal + 136 58 UIKit
0x33551e7d UIApplicationMain + 1080 59 TrackAboutIOS
0x01696c74 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string
_intptr_intptr + 240 60 TrackAboutIOS 0x00098420 TrackAboutIOS_Application_Main_string__ + 152 61 TrackAboutIOS
0x008b0450 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200 62 TrackAboutIOS 0x01d05834 mono_jit_runtime_invoke + 1644 63 TrackAboutIOS
0x01dbd09c mono_runtime_invoke + 128 64 TrackAboutIOS
0x01dc16b4 mono_runtime_exec_main + 436 65 TrackAboutIOS
0x01dc1a74 mono_runtime_run_main + 756 66 TrackAboutIOS
0x01d0c744 mono_jit_exec + 140 67 TrackAboutIOS
0x01e41110 main + 2288 68 TrackAboutIOS
0x0009826c start + 52

最佳答案

通常有一个异常(exception) 类型 留言 行前:

Stacktrace:


它通常会很好地提示问题。现在 native 堆栈跟踪也在这里提供了一个线索:

0x01e394ac monoeg_g_log + 208 6 TrackAboutIOS

0x01d11664 get_numerous_trampoline + 160 7 TrackAboutIOS


第一行告诉我们在您的日志中打印了一些东西(或者至少它试图打印)。如果您检查设备的日志(例如使用 Xcode 或 mtouch --logdev ),您应该会看到消息。
下一行让我觉得你的蹦床用完了(错误消息会告诉你哪种类型)。这是 instructions关于如何增加可用于您的应用程序的蹦床数量。
注意:如果这与蹦床无关,请编辑您的问题以添加异常类型/消息和设备日志的内容。

关于ios - MonoTouch 在设备上随机崩溃,而不是在模拟器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10365919/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com