锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 开源技术 / ios开源技术 / IOS键盘插件因为SIGQUIT崩溃
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

锐英源精品开源,禁止转载和任何形式的非法内容使用,违者必究


IOS键盘插件因为SIGQUIT崩溃

When I try to build and run my keyboard extension, it sometimes just crashes with a Thread 1: signal SIGQUIT.

当我尝试构建并运行我的键盘扩展时,它有时就崩溃了提示:Thread 1: signal SIGQUIT。

I am not able to reproduce the error. Sometimes I can build and run my app but most of the time the keyboard just quits. This happens on an actual device. In the simulator it does not open my keyboard and says Waiting to Attach.我无法重现错误。有时我可以构建和运行我的应用程序,但大多数时候键盘会退出。这发生在实际设备上。在模拟器中,它没有打开键盘说Waiting to Attach。

The console does not output any errors at first. However, if I change the dropdown to View UI Hierachy in the Debug navigator I get the following description:控制台一开始不输出任何错误。但是,如果我在Debug导航器中将下拉列表更改为View UI Hierachy,我会得到以下描述:

Details:  No plist data for fetching view hierarchy: error evaluating expression “(id)[(Class)objc_getClass("DBGViewDebuggerSupport_iOS") fetchViewHierarchyWithOptions:(id)[(Class)objc_getClass("NSDictionary") dictionaryWithObjects:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:1]] arrayByAddingObject:(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"_UIVisualEffectBackdropView"] arrayByAddingObject:@"_UIBackdropEffectView"]] arrayByAddingObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:0]] forKeys:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"DBGViewDebuggerUseLayersAsSnapshots"] arrayByAddingObject:@"DBGViewDebuggerEffectViewsToSnapshotAsImage"] arrayByAddingObject:@"DBGViewDebuggerAlwaysEncodeLayers"]]]”: error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x18daddc34).
The process has been returned to the state before expression evaluation. 
Method:   -[DBGAbstractViewDescriber handleFetchedViewInfo:fetchError:resultHandler:]
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.  

I also took a screenshot of the processes.我还截取了流程的截图。

Am I doing something wrong and how could I prevent that my keyboard extension quits all the time when running it? Is it actually a bug as it says in the description?我做错了什么,怎么能阻止我的键盘扩展在运行时一直退出?它实际上是一个如描述中所述的错误吗?

It seems like something in xCode 8.2.1 is broken and the debugger is not correctly attaching to the correct process or the hosting process is not properly loading the new code.

This is a not a permanent solution but a temporary workaround.似乎xCode 8.2.1中的某些内容被破坏且调试器未正确附加到正确的进程或托管进程未正确加载新代码。

这不是永久性解决方案,而是临时解决方法。

WORKAROUND替代方法

I have been able to work around this issue by following the steps below.

  1. Kill any process that is using your keyboard (important!)
  2. Launch the application using the debugger so the latest code is deployed to the device
  3. Navigate to Settings > General > Keyboards > etc.
  4. Remove your custom keyboard
  5. Re-add your custom keyboard
  6. Debug the application once again

The reason this works is because removing the keyboard kills the process that is hosting the extension allowing Xcode to attach to the new binary.

我已经能够通过以下步骤解决此问题。

  1. 杀死使用键盘的任何进程(重要!)
  2. 使用调试器启动应用程序,以便将最新代码部署到设备
  3. 导航到设置>常规>键盘>等。
  4. 删除自定义键盘
  5. 重新添加自定义键盘
  6. 再次调试应用程序

这样做的原因是因为删除键盘会导致托管扩展的进程终止,从而允许Xcode附加到新的二进制文件。

答2

As I understand this is a bug in Xcode 8.2.1. because before update my custom keyboard was working very well. this is a temporary solution.

  1. Run your code like always!据我所知,这是Xcode 8.2.1中的一个错误。因为在更新之前我的自定义键盘工作得很好。这是一个临时解决方案。
  2. Bring up your keyboard until the error (SIGQUIT) appear!
  3. Goto xcode > debug > detach
  4. Goto again Xcode > debug > Attach to Process: attach the keyboard (it should be first process)

now, your breakpoints will work. but there are no log output unfortunately! I hope it temporary solve your problem

  1. 像往常一样运行你的代码!
  2. 调出键盘直到出现错误(SIGQUIT)!
  3. 转到xcode> debug> detach
  4. 转到Xcode> debug> Attach to Process:附加键盘(应该是第一个进程)

现在,您的断点将起作用。但遗憾的是没有日志输出!我希望它能暂时解决你的问题

现场

我开发时遇到了此问题,没什么好办法,这对调试影响很大,我的做法是在目标断点后面设置断点,看功能有没有向下进行,希望这对大家有帮助.

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内