2

Recently I introduced a second app target to my Xcode project and split a great portion of my codebase into frameworks. All was working fine initially, but as I created more frameworks my debugger stopped working. My project is incredibly large with a lot of components that I’d like to import into some app targets but not others.

When the app stops at a breakpoint I get the following console output:

The REPL and expressions are unavailable.  
Shared Swift state for <AppName> could not be initialized.  

Breakpoints work most of the time, but occasionally the entire debugger will crash, giving me this output:

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.  

Platforms: OSX 10.14.3, Xcode 10.1, iOS SDK 9.0

Total number of targets in project: ~250

App Targets: 2

Frameworks: 117

Tests: 127

Attempted fixes:

  • Updating pods
  • Removing all pods
  • Removing CommonCrypto as sugggested elsewhere
  • carthage update --platform-iOS --no-use-binaries
  • Checking for files with targets marked as main app target and framework imported by main app target
  • Restarting Xcode and the computer
  • Deleting derivedData
  • Clean and rebuild
  • Looks like a bug in LLDB, I'm also seeing this. Not sure what's going on. – Qix - MONICA WAS MISTREATED May 26 '19 at 15:49
  • @Qix Updated my codebase for Xcode 10.2.1 and the debugger is working again. I managed to reproduce this issue in March by creating a project with dozens of internal frameworks. Since updating Xcode this project seems to be working too – Oisín Byrne May 27 '19 at 16:07
  • So I found out what my issue was: it was due to a stack overflow due to a recursive call never breaking the codepath. I threw my project into a docker container and ran it with gdb, which caught the stack overflow and showed me the problem. – Qix - MONICA WAS MISTREATED May 29 '19 at 13:43

0 Answers0