gpt4 book ai didi

xamarin - 在 Xamarin.IOS 中执行 native 代码时收到 SIGSEGV

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

模拟器和 xamarin 之间的链接在几秒钟后停止(模拟器为白色),我无法再次按下播放按钮。我为这个 iOS 项目使用 Xamarin.Forms。我已在 Xamarin Studio 和 Visual Studio 的最新版本中尝试过此操作。

native 堆栈跟踪:

2017-09-13 14:22:34.113 NewsTestOne.iOS[25106:19993674] critical:   0   NewsTestOne.iOS                     0x0000000106847184
mono_handle_native_crash + 244
2017-09-13 14:22:34.113 NewsTestOne.iOS[25106:19993674] critical: 1 NewsTestOne.iOS 0x000000010685320b mono_sigsegv_signal_handler + 171
2017-09-13 14:22:34.114 NewsTestOne.iOS[25106:19993674] critical: 2 libsystem_platform.dylib 0x000000010d451b3a _sigtramp + 26
2017-09-13 14:22:34.114 NewsTestOne.iOS[25106:19993674] critical: 3 ??? 0x0003f78b358d56aa 0x0 + 1116602201101994
2017-09-13 14:22:34.114 NewsTestOne.iOS[25106:19993674] critical: 4 CFNetwork 0x000000010bc51e2e _ZN15TCPIOConnection16_startConnectionEv + 530
2017-09-13 14:22:34.114 NewsTestOne.iOS[25106:19993674] critical: 5 CFNetwork 0x000000010bd8e32a ___ZN4Tube23_onqueue_prepConnectionEU13block_pointerFvvEU13block_pointerFviE_block_invoke.67 + 726
2017-09-13 14:22:34.114 NewsTestOne.iOS[25106:19993674] critical: 6 CFNetwork 0x000000010bd8e807 ___ZN4Tube23_onqueue_prepConnectionEU13block_pointerFvvEU13block_pointerFviE_block_invoke_2.83 + 21
2017-09-13 14:22:34.115 NewsTestOne.iOS[25106:19993674] critical: 7 libdispatch.dylib 0x000000010d0ae585 _dispatch_call_block_and_release + 12
2017-09-13 14:22:34.115 NewsTestOne.iOS[25106:19993674] critical: 8 libdispatch.dylib 0x000000010d0cf792 _dispatch_client_callout + 8
2017-09-13 14:22:34.115 NewsTestOne.iOS[25106:19993674] critical: 9 libdispatch.dylib 0x000000010d0b5237 _dispatch_queue_serial_drain + 1022
2017-09-13 14:22:34.115 NewsTestOne.iOS[25106:19993674] critical: 10 libdispatch.dylib 0x000000010d0b598f _dispatch_queue_invoke + 1053
2017-09-13 14:22:34.115 NewsTestOne.iOS[25106:19993674] critical: 11 libdispatch.dylib 0x000000010d0b7899 _dispatch_root_queue_drain + 813
2017-09-13 14:22:34.116 NewsTestOne.iOS[25106:19993674] critical: 12 libdispatch.dylib 0x000000010d0b750d _dispatch_worker_thread3 + 113
2017-09-13 14:22:34.116 NewsTestOne.iOS[25106:19993674] critical: 13 libsystem_pthread.dylib 0x000000010d4635a2 _pthread_wqthread + 1299
2017-09-13 14:22:34.116 NewsTestOne.iOS[25106:19993674] critical: 14 libsystem_pthread.dylib 0x000000010d46307d start_wqthread + 13
2017-09-13 14:22:34.116 NewsTestOne.iOS[25106:19993674] critical:

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

最佳答案

这通常表示您的代码中存在线程错误,我建议您调试所有异步的服务器端调用,可能有很多情况,例如:

  • 在后台线程中运行的 Task.Run 方法试图更新 UI 属性。

  • 在异步任务中使用的 Custom RendererDependency Service

  • 如果您的代码中有定时器,也请查看它们。

使用最新版本的 Xamarin,调试器无法正确调试 native 代码,因此请确保清理解决方案并尝试在真实设备上进行调试。 (有时摆脱断点也有帮助。)

关于xamarin - 在 Xamarin.IOS 中执行 native 代码时收到 SIGSEGV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46199403/

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