LLDB RPC Server Crashed (Xcode 12)

We have some developers on our team experiencing a crash while trying to debug.


Message from 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.

Code Block
Fatal error: Invalid position SourceEditorPosition: line: 244, col: 38 with line length 26 : file /Library/Caches/com.apple.xbs/Sources/SourceEditor/SourceEditor-17136/SourceEditor/SourceEditor/CoreEditor/Model/SourceEditorDataSource.swift, line 2710


This is happening with breakpoints in specific spots in our mostly C++ codebase. It is happening in Xcode 12.0.1 and did not happen in the same version of Xcode in our branch without the Widget Extension added. Is there anything we can do? We've reported it with Apple Feedback and heard nothing back. We're going to try to reproduce it on Xcode 12.1.1 RC.

We've reported it with Apple Feedback

What was the bug number?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
We have filed Apple Feedback #: 12A7403 and 8819661. Thanks, Quinn!

FB8819661

Thanks!

We’ve seen reports of similar problems from internal folks. I can’t explain all the details but it seems that LLDB has encountered some complex debugging info related to C++, got itself confused, and then handled that very ungracefully. Clearly we are interested in finding a fix for this.

Is there any chance you could share a project that reproduces the problem? If so, that’d really help the LLDB folks investigate this.

If you’re able to do this, please add the project to your bug report and then post back here to let me know. But if not, that’s cool, I understand that sharing code is not always feasible.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
I don't think we're able to include our project. It is pretty big. We have noticed that the methods that crash include a std::function<> as a parameter. If we remove this parameter from the method, the debugger does not appear to crash anymore. We continue to work on a smaller repro case, but any additional info I can add, I will. It is limited to specific methods and not the application as a whole.
We have another set of crash reports included on feedback #: FB8885767.
If anything this is getting worse with subsequent releases of Xcode. I crash just stepping over code in C++ on my M1 Mac Mini now running Xcode 12.4 (12D4e) on Big Sur (11.2 20D6). I submitted my most recent set of crash logs with feedback #FB8983057. Would really love to be able to use the debugger for C++ projects again.
LLDB RPC Server Crashed (Xcode 12)
 
 
Q