错误'_BSMachError:port 1607; (os/kern)iOS 10上的Cordova应用程序中的无效功能(0x14)"无法插入COPY_SEND"

ume*_*esh 62 objective-c cordova ios10 xcode8

一切正常,直到我使用Xcode 7.3.0构建我的cordova应用程序,但是只要我在使用Xcode 8构建相同的应用程序时,只要我将方向从Portrait更改为Landscape,它在iOS 10设备上开始崩溃,因为它在iOS上仍能正常工作9.3.1.在调试器中,我得到以下日志:

2016-09-24 18:14:41.212470 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"
2016-09-24 18:14:41.613460 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid name (0xf) "Unable to insert COPY_SEND"
2016-09-24 18:14:41.613947 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid name (0xf) "Unable to insert COPY_SEND"
2016-09-24 18:14:41.614469 MyApp[2542:1028606] [Common] _BSMachError: port 1607; (os/kern) invalid name (0xf) "Unable to deallocate send right"
Message from debugger: Terminated due to memory issue
Run Code Online (Sandbox Code Playgroud)

下面是堆栈跟踪

警告:无法从dyld共享缓存加载任何Objective-C类信息.这将显着降低可用类型信息的质量.

* thread #1: tid = 0xfc80c, 0x00000001000cff00 MyApp`-[MainViewController didReceiveMemoryWarning](self=0x0000000119e0da60, _cmd="didReceiveMemoryWarning") + 40 at MainViewController.m:59, stop reason = breakpoint 7.1

  * frame #0: 0x00000001000cff00 MyApp`-[MainViewController didReceiveMemoryWarning](self=0x0000000119e0da60, _cmd="didReceiveMemoryWarning") + 40 at MainViewController.m:59
    frame #1: 0x0000000192e29964 UIKit`+[UIViewController _traverseViewControllerHierarchyWithDelayedRelease:] + 432
    frame #2: 0x0000000192d5a0f4 UIKit`-[UIApplication _performMemoryWarning] + 232
    frame #3: 0x0000000192d5a294 UIKit`-[UIApplication _receivedMemoryNotification] + 140
    frame #4: 0x0000000100a7d21c libdispatch.dylib`_dispatch_client_callout + 16
    frame #5: 0x0000000100a893a8 libdispatch.dylib`_dispatch_continuation_pop + 708
    frame #6: 0x0000000100a97fa8 libdispatch.dylib`_dispatch_source_latch_and_call + 204
    frame #7: 0x0000000100a7f304 libdispatch.dylib`_dispatch_source_invoke + 836
    frame #8: 0x0000000100a82060 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 652
    frame #9: 0x000000018cc29f2c CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    frame #10: 0x000000018cc27b18 CoreFoundation`__CFRunLoopRun + 1660
    frame #11: 0x000000018cb56048 CoreFoundation`CFRunLoopRunSpecific + 444
    frame #12: 0x000000018e5d9198 GraphicsServices`GSEventRunModal + 180
    frame #13: 0x0000000192b2f818 UIKit`-[UIApplication _run] + 684
    frame #14: 0x0000000192b2a550 UIKit`UIApplicationMain + 208
    frame #15: 0x00000001000c7ecc MyApp`main(argc=1, argv=0x000000016fd3fab8) + 76 at main.m:32
    frame #16: 0x000000018bb385b8 libdyld.dylib`start + 4
Run Code Online (Sandbox Code Playgroud)

我在跑

  • Xcode 8
  • Cordova 6.3.0(iOS 4.1.0)
  • iOS 10 iPhone 6

请帮忙.

Cra*_*ing 59

我在调试器中收到"无效功能(0x14)"无法插入COPY_SEND消息,这将阻止应用程序启动大约10秒钟.

我在文件中设置了断点,这些断点已经从项目中删除但仍然出现在Breakpoint导航器中(文件名为红色).

我删除了所有断点,从那以后没有看到错误消息.

  • 我知道这听起来很奇怪,但实际上这就是诀窍.刚刚删除了所有的断点和BAM!一切都突然有效! (5认同)

Nei*_*msz 48

我在iOS10.0 beta阶段遇到了同样的问题,它似乎仍然出现在Xcode v8.1中.

实际上有2个单独的错误:


1. 首先,正如Avaan评论的那样,您必须在info.plist中设置所有隐私使用.我相信这是你崩溃的原因.

从iOS10.0开始,必须明确告诉用户您将使用的手机功能,以及原因.

项目信息


2.关于错误:

BSMachError:端口1607; (os/kern)无效功能(0x14)"无法插入COPY_SEND"

我用这个小解决方法解决了错误:

  1. 进入项目设置/常规 - >部署信息,检查所有方向.

常规设置

  1. 构建并运行,界面应根据设备方向旋转.
  2. 撤消刚刚做的事情(取消选中您不需要的方向).再次构建和运行,错误不应再出现.

我希望这有帮助

  • 哇...我没想到这会起作用,但确实如此.+1编辑:XCode v8.1 (3认同)

Pet*_*mer 5

对我而言,原因是[myTextField becomeFirstResponder]; 放置在初始viewWillAppear线程结束之后。


小智 5

我在执行核心数据重置时恰好收到此错误,但以上解决方案均不适用于我的情况。原来是代码在UIAlert的动作中发生的结果,需要将其推送到主线程中。通过此处找到的解决方案- 收到关于CloudKit记录添加的远程通知后,错误_BSMachError:(os / kern)无效功能(20) -并在以下针对Swift 4进行了更新:

alert.addAction(UIAlertAction(title: "Reset Now", style: UIAlertAction.Style.default, handler: { action in
            DispatchQueue.main.async {
                // Core Data reset code goes here...
            }
}))
Run Code Online (Sandbox Code Playgroud)


San*_*kar 1

事实证明 - 如果您调用 EventKit、ContactsKit、麦克风、相机等需要权限但没有 Info.plist 键(如
隐私 - 使用时位置使用说明
隐私 - 媒体库使用说明)的权限,应用程序将会崩溃

我从https://forums.developer.apple.com/thread/48959 线程得到了这个答案

另外,检查您是否忘记禁用僵尸。