Search code examples
xcode-instruments

XCode Instruments keeps my app crashing


I just wanted to start optimizing my app and launched it through Instruments. But no matter which of the tools I use my app crashes immediately when it's launched.

When I run my app normally it does not show any issue. Further I ran it with Instruments a couple of days/weeks ago with no issue. But today it will not even start.

Instruments shows the following (from the short start)

Total Samples   Running Time    Self        Symbol Name
322 322.0ms   92.0% 0,0     Main Thread  0x1734
256 256.0ms   73.1% 0,0      start
64  64.0ms   18.2%  0,0      _dyld_start
2   2.0ms    0.5%   2,0      objc_opt::objc_stringhash_t::hash(char const*, unsigned long) const
9   9.0ms    2.5%   0,0     _dispatch_mgr_thread  0x1752
7   7.0ms    2.0%   0,0     _dispatch_worker_thread3  0x1756
5   5.0ms    1.4%   0,0     _dispatch_worker_thread3  0x1755
4   4.0ms    1.1%   0,0     start_wqthread  0x1754
2   2.0ms    0.5%   0,0     _dispatch_worker_thread3  0x1753

Here I wanted to show a part of the app crash (though likely useless) but it even does not start my app. Aaaarrrggghhhhh

Wait - the console log!

01.03.15 21:57:33,149 Xcode[1831]:  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77
Details:  Failed to load dependencies output contents from ``/Users/thomaskilian/Library/Developer/Xcode/DerivedData/CaLister-evdxmqajatsxzqeosqkzlmfglmva/Build/Intermediates/CaLister.build/Debug/CaLister.build/Objects-normal/x86_64/ShiftedCell.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “ShiftedCell.d” couldn’t be opened because there is no such file." UserInfo=0x7ffc7f4732c0 {NSFilePath=/Users/thomaskilian/Library/Developer/Xcode/DerivedData/CaLister-evdxmqajatsxzqeosqkzlmfglmva/Build/Intermediates/CaLister.build/Debug/CaLister.build/Objects-normal/x86_64/ShiftedCell.d, NSUnderlyingError=0x7ffc7f4741b0 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/thomaskilian/Library/Developer/Xcode/DerivedData/CaLister-evdxmqajatsxzqeosqkzlmfglmva/Build/Intermediates/CaLister.build/Debug/CaLister.build/Objects-normal/x86_64/ShiftedCell.d";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))
Thread:   <NSThread: 0x7ffc7b799b60>{number = 2, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

-> see my own answer


Solution

  • It turns out that Instruments is part of the ongoing Alpha Study called Swift which Apple is currently taking on their "Developers, developers, developers". Thank you, Apple!