执行本机代码时出现 SIGABRT xamarin.ios [英] Got a SIGABRT while executing native code xamarin.ios

查看:28
本文介绍了执行本机代码时出现 SIGABRT xamarin.ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个 xamarin.ios 应用程序.该应用程序一直运行良好.没有任何代码更改,而且出乎意料的是,该应用程序现在在访问相机时崩溃.我不知道为什么会发生这种情况,有人可以对这个问题有所了解吗?我已经围绕这个错误用谷歌搜索并尝试了各种方法,包括删除各种软件包.我最近更新到 ios 10,但更新后该应用程序仍然运行良好.错误如下:

I've built a xamarin.ios app. The app has been working absolutely fine. There have been no code changes and out of the blue, the app now crashes when accessing the camera. I have no idea why this is happening, could anyone shed some light on this problem? I've google around this error and tried various things, including removing various packages. I recently updated to ios 10 but the app was still working fine after the update. The error is below:

2016-10-10 21:44:28.925 Coacher[307:24128] 关键:原生堆栈跟踪:

2016-10-10 21:44:28.925 Coacher[307:24128] critical: Native stacktrace:

2016-10-10 21:44:28.934 Coacher[307:24128] 严重:0
libmonosgen-2.0.dylib 0x00363d33mono_handle_native_sigsegv + 242 2016-10-10 21:44:28.934Coacher[307:24128] 关键:1 libsystem_platform.dylib
0x1db5326d _sigtramp + 24 2016-10-10 21:44:28.935 教练[307:24128]关键:2 libsystem_kernel.dylib 0x1da9fd8f+ 64 2016-10-10 21:44:28.935 教练 [307:24128] 批评:3 libsystem_kernel.dylib 0x1da9fdd9system_set_sfi_window + 0 2016-10-10 21:44:28.935 教练 [307:24128]关键:4 TCC 0x201a8e85+ 228 2016-10-10 21:44:28.936 教练 [307:24128] 批评:5 TCC 0x201a8da1 + 02016-10-10 21:44:28.936 Coacher[307:24128] 关键:6 TCC
0x201ab57b + 276 2016-10-10 21:44:28.936 教练[307:24128]关键:7 libxpc.dylib 0x1db8915f+ 46 2016-10-10 21:44:28.937 教练 [307:24128] 批评:8 libxpc.dylib 0x1db89101 + 262016-10-10 21:44:28.937 教练 [307:24128] 关键:9
libdispatch.dylib 0x1d9ae49b + 6042016-10-10 21:44:28.937 教练 [307:24128] 关键:10libdispatch.dylib 0x1d9afa91 + 3782016-10-10 21:44:28.938 教练 [307:24128] 关键:11libdispatch.dylib 0x1d9af8b7 + 1062016-10-10 21:44:28.938 教练 [307:24128] 关键:12libsystem_pthread.dylib 0x1db55947 _pthread_wqthread +1168 2016-10-10 21:44:28.938 教练 [307:24128] 关键:13libsystem_pthread.dylib 0x1db5549c start_wqthread + 82016-10-10 21:44:28.939 教练 [307:24128] 关键:================================================================== 执行本机代码时收到 SIGABRT.这通常表示致命的单声道运行时或您使用的本机库之一中的错误

2016-10-10 21:44:28.934 Coacher[307:24128] critical: 0
libmonosgen-2.0.dylib 0x00363d33 mono_handle_native_sigsegv + 242 2016-10-10 21:44:28.934 Coacher[307:24128] critical: 1 libsystem_platform.dylib
0x1db5326d _sigtramp + 24 2016-10-10 21:44:28.935 Coacher[307:24128] critical: 2 libsystem_kernel.dylib 0x1da9fd8f + 64 2016-10-10 21:44:28.935 Coacher[307:24128] critical: 3 libsystem_kernel.dylib 0x1da9fdd9 system_set_sfi_window + 0 2016-10-10 21:44:28.935 Coacher[307:24128] critical: 4 TCC 0x201a8e85 + 228 2016-10-10 21:44:28.936 Coacher[307:24128] critical: 5 TCC 0x201a8da1 + 0 2016-10-10 21:44:28.936 Coacher[307:24128] critical: 6 TCC
0x201ab57b + 276 2016-10-10 21:44:28.936 Coacher[307:24128] critical: 7 libxpc.dylib 0x1db8915f + 46 2016-10-10 21:44:28.937 Coacher[307:24128] critical: 8 libxpc.dylib 0x1db89101 + 26 2016-10-10 21:44:28.937 Coacher[307:24128] critical: 9
libdispatch.dylib 0x1d9ae49b + 604 2016-10-10 21:44:28.937 Coacher[307:24128] critical: 10 libdispatch.dylib 0x1d9afa91 + 378 2016-10-10 21:44:28.938 Coacher[307:24128] critical: 11 libdispatch.dylib 0x1d9af8b7 + 106 2016-10-10 21:44:28.938 Coacher[307:24128] critical: 12 libsystem_pthread.dylib 0x1db55947 _pthread_wqthread + 1168 2016-10-10 21:44:28.938 Coacher[307:24128] critical: 13 libsystem_pthread.dylib 0x1db5549c start_wqthread + 8 2016-10-10 21:44:28.939 Coacher[307:24128] critical: ================================================================= Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your

推荐答案

这是因为您的 iOS 10 更新.您现在需要请求相机的许可.下面的博文介绍了如何设置这些权限.

This is because of your iOS 10 update. You need to request the permission for the camera now. The following blog post explains how to set up these permissions, now.

https://devblogs.microsoft.com/xamarin/new-ios-10-privacy-permission-settings/

从 iOS 10 开始,几乎所有需要请求授权的 API 和其他 API,例如打开相机或照片库,都需要一个新的键值对来描述它们在 Info.plist 中的用法.这与使用 Geolocation 和 iBeacon API 时将 NSLocationWhenInUseUsageDescription 或 NSLocationAlwaysUsageDescription 放入 Info.plit 的要求非常相似.现在的区别在于,当应用在未设置这些密钥的情况下尝试授权时,应用会崩溃.

Starting in iOS 10, nearly all APIs that require requesting authorization and other APIs, such as opening the camera or photo gallery, require a new key value pair to describe their usage in the Info.plist. This is very similar to the requirement for NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to be put into the Info.plit when using Geolocation and iBeacon APIs. The difference now is that the application will crash when the app attempts authorization without these keys set.

这篇关于执行本机代码时出现 SIGABRT xamarin.ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆