每当我尝试通过3个UIButton快速切换3个不同视图(每个视图包含一些shinobi图表和webview作为子视图)时,我的应用程序崩溃。但是,我的应用程序日志中没有任何异常。 我是Xamarin开发的新手,我正在尝试解决现有应用程序的一些问题。 在检查iOS设备日志时,我发现了一个SIGSEGV堆栈跟踪:
"执行本机代码时获得了SIGSEGV。这通常表明 单声道运行时或其中一个本机库中的致命错误 您的应用程序使用。"
如果我在3个视图之间慢慢切换(在一秒钟后),一切正常。我担心视图获取处理的方式存在问题,如果我不快速切换显示的视图,垃圾收集器可能会自行解决问题。
这是iOS设备日志输出:
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Warning>: Disposing FinancialTableViewController...
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Warning>: Disposing FinancialLCViewController...
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: Stacktrace:
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at <unknown> <0xffffffff>
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at MonoTouch.UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0001c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:45
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at LoroPiana.Application.Main (string[]) [0x00009] in /Users/nautessrl/Projects/Monotouch/LoroPianaTMS/Main.cs:18
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>:
Native stacktrace:
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 0 LoroPiana 0x00b7f4a9 mono_handle_native_sigsegv + 240
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 1 LoroPiana 0x00b89781 mono_sigsegv_signal_handler + 208
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 2 libsystem_platform.dylib 0x38e8087b _sigtramp + 42
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 3 UIKit 0x2e4eca2d <redacted> + 140
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 4 CoreFoundation 0x2ae4af3f <redacted> + 354
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 5 CoreFoundation 0x2ad7d208 _CF_forwarding_prep_0 + 24
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 6 UIKit 0x2e32f82d <redacted> + 84
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 7 UIKit 0x2e32f765 <redacted> + 24
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 8 UIKit 0x2e32f71d <redacted> + 64
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 9 UIKit 0x2e32f26d <redacted> + 104
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 10 UIKit 0x2e32f0c7 <redacted> + 38
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 11 UIKit 0x2e32f085 <redacted> + 56
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 12 UIKit 0x2e32e7d7 <redacted> + 618
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 13 UIKit 0x2e32e0ed <redacted> + 292
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 14 UIKit 0x2e32d727 <redacted> + 338
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 15 UIKit 0x2e437261 <redacted> + 108
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 16 UIKit 0x2e3361ab <redacted> + 910
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 17 CoreFoundation 0x2ae4c3e4 <redacted> + 68
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 18 CoreFoundation 0x2ad79845 <redacted> + 300
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 19 CoreFoundation 0x2ad7d2c7 <redacted> + 50
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 20 WebKitLegacy 0x36d9a261 <redacted> + 224
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 21 CoreFoundation 0x2ae4af3f <redacted> + 354
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 22 CoreFoundation 0x2ad7d208 _CF_forwarding_prep_0 + 24
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 23 CoreFoundation 0x2ae4c3e4 <redacted> + 68
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 24 CoreFoundation 0x2ad79845 <redacted> + 300
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 25 WebCore 0x362c0c79 <redacted> + 100
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 26 CoreFoundation 0x2ae0e58f <redacted> + 14
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 27 CoreFoundation 0x2ae0d99f <redacted> + 218
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 28 CoreFoundation 0x2ae0c005 <redacted> + 772
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 29 CoreFoundation 0x2ad5a621 CFRunLoopRunSpecific + 476
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 30 CoreFoundation 0x2ad5a433 CFRunLoopRunInMode + 106
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 31 GraphicsServices 0x320a00a9 GSEventRunModal + 136
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 32 UIKit 0x2e345359 UIApplicationMain + 1440
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 33 LoroPiana 0x00441ab0 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 34 LoroPiana 0x003f7c98 MonoTouch_UIKit_UIApplication_Main_string___intptr_intptr + 52
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 35 LoroPiana 0x003f7c58 MonoTouch_UIKit_UIApplication_Main_string___string_string + 204
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 36 LoroPiana 0x0015e000 LoroPiana_Application_Main_string__ + 208
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 37 LoroPiana 0x005ca8a4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 38 LoroPiana 0x00b8b97b mono_jit_runtime_invoke + 1158
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 39 LoroPiana 0x00bd38e9 mono_runtime_invoke + 88
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 40 LoroPiana 0x00bd6e0b mono_runtime_exec_main + 282
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 41 LoroPiana 0x00bd6c53 mono_runtime_run_main + 438
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 42 LoroPiana 0x00b75d29 mono_jit_exec + 48
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 43 LoroPiana 0x00c207fc monotouch_main + 2292
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 44 LoroPiana 0x00b58aed main + 108
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>: 45 LoroPiana 0x0015df1c start + 40
Oct 15 12:40:36 Meraxes LoroPiana[4675] <Error>:
=================================================================
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.
=================================================================
Oct 15 12:40:36 Meraxes ReportCrash[4677] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Oct 15 12:40:36 Meraxes ReportCrash[4677] <Notice>: ReportCrash acting against PID 4675
我应该从哪里开始检查这类问题?
我目前正在使用Xamarin 5.5在iOS 8.0.2的视网膜ipad mini上进行开发。
答案 0 :(得分:0)
问题在于三个中的两个视图两次被Disposed。 修复解决了我的问题。