ios 什么是 LLDB RPC 服务器?它什么时候在 Xcode 中崩溃?为什么会崩溃?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43635522/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is LLDB RPC Server ? When does it crash in Xcode? Why it crashes?
提问by Kumar Utsav
I am getting a message in my debugger:
我在调试器中收到一条消息:
The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
LLDB RPC 服务器已崩溃。崩溃日志位于 ~/Library/Logs/DiagnosticReports 并具有前缀“lldb-rpc-server”。请提交错误并附上最新的崩溃日志。
采纳答案by iHulk
Make sure you are not running the app in releasemode, if it is in releasemode then change it to debug.
确保你没有运行在应用发布模式,如果是在释放模式,然后将其更改到调试。
回答by Stefan
In my case the LLDB RPC server consistently crashed every time I ran my app, even after cleaning the build folder and removing and reinstalling Xcode (Version 8.3.3 (8E3004b)) completely.
在我的情况下,LLDB RPC 服务器每次运行我的应用程序时都会崩溃,即使在清理构建文件夹并完全删除并重新安装 Xcode(版本 8.3.3 (8E3004b))之后也是如此。
It turned out that apparently LLDB took objection to a breakpoint I had set, just moving this breakpoint by a line resolved the issue.
事实证明,显然 LLDB 反对我设置的断点,只需将该断点移动一行即可解决问题。
回答by andrew54068
In my case: I update to Xcode Version 9.3 (9E145) recently and Xcode execute to the line with breakpoint then I type "po XXX" commend it will show the same message. I try to delete following files
就我而言:我最近更新到 Xcode 版本 9.3 (9E145) 并且 Xcode 执行到带有断点的行,然后我输入“po XXX”推荐它会显示相同的消息。我尝试删除以下文件
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
and it solved. not knowing exactly why but worth to try.
它解决了。不知道确切原因,但值得一试。
remember to backup those files in order to recovered in case any unexpected situation occur.
请记住备份这些文件,以便在发生任何意外情况时进行恢复。
回答by Boris Nikolic
I had the same problem and fixed it after I deleted some of the breakpoints. Not sure why this happen at all, but at least you can remove breakpoints and use some NSLog()
or print()
if you are in Swift and debug with the help of those. Good luck!
我遇到了同样的问题,并在删除了一些断点后修复了它。完全不知道为什么会发生这种情况,但至少您可以删除断点并使用一些断点,NSLog()
或者print()
如果您在 Swift 中并在这些断点的帮助下进行调试。祝你好运!
回答by James
Clearly a lot of different causes for this, but for me I was using a DispatchGroup to keep track of multiple async tasks.
显然有很多不同的原因,但对我来说,我使用 DispatchGroup 来跟踪多个异步任务。
I had forgotten to call dispatchGroup.enter()
before one of the async tasks (but still calling dispatchGroup.leave()
when it finished).
我忘记dispatchGroup.enter()
在异步任务之一之前调用(但dispatchGroup.leave()
在完成后仍然调用)。
Adding this in fixed the crash for me.
添加这个修复了我的崩溃。
回答by suresh
I foundthe solutionto this issue. I don't know is this correct or not, but this solution is work for me. what I did is Actually I connected two devices to my mac mini, in one device I run the app and get the above error in my console. Then I removed one device and tried, this time I didn't get any error in my console its worked fine. I think you guys won't believe this, I tried Almost 3 time with two devices and one device its only work for one device
我找到了这个问题的解决方案。我不知道这是否正确,但这个解决方案对我有用。我所做的是实际上我将两台设备连接到我的 mac mini,在一台设备上我运行该应用程序并在我的控制台中收到上述错误。然后我移除了一台设备并尝试了,这次我的控制台没有出现任何错误,它工作正常。我想你们不会相信这一点,我用两台设备尝试了将近 3 次,而一台设备仅适用于一台设备
回答by Developersian
This error occurs for different reasons and the main one is when you add a watch app later to your project where Xcode adds an extra build target to scheme. click on scheme section in right side of "run/stop buttons" then hit on edit scheme, hit on Build section which is the first one, There you see 2 targets one has 2 sub targets which includes watch app and watch extension in it and the other one has no sub targets and it is a watch app target.
发生此错误的原因有多种,主要是当您稍后将手表应用程序添加到您的项目时,Xcode 将额外的构建目标添加到方案中。单击“运行/停止按钮”右侧的方案部分,然后点击编辑方案,点击第一个构建部分,您会看到 2 个目标,其中一个有 2 个子目标,其中包括手表应用程序和手表扩展程序以及另一个没有子目标,它是一个手表应用程序目标。
Solution is simple delete the watch app target which has no sub targets and run the app again.
解决方案很简单,删除没有子目标的手表应用程序目标,然后再次运行该应用程序。
回答by uoop
In my case. I'm also using SQLite.swift to create database. The crashing happened when I tried to change a column data type of an existing table in code(which was not in the right way to do it), then inserted a tuple with new data type, then tried to print all the tuple out.
就我而言。我也在使用 SQLite.swift 创建数据库。当我尝试在代码中更改现有表的列数据类型时发生崩溃(这不是正确的方法),然后插入一个具有新数据类型的元组,然后尝试打印出所有元组。
Solution: Delete the .sqlite3 database file you have or delete the table with conflict data type and recreate them all.
解决方案:删除您拥有的 .sqlite3 数据库文件或删除具有冲突数据类型的表并重新创建它们。