添加DTPerformanceSession.framework会导致应用在运行时崩溃 [英] Adding DTPerformanceSession.framework causes app to crash on run
问题描述
我将DTPerformanceSession.framework添加到OSX应用程序的构建阶段,当我运行该应用程序时,它崩溃并出现以下错误:
I added DTPerformanceSession.framework to the OSX app Build Phases and when I run the app it crashes with the following error:
dyld`dyld_fatal_error:
0x7fff5fc0109c: int3
0x7fff5fc0109d: nop
控制台消息:
dyld: Library not loaded: @rpath/DTPerformanceSession.framework/Versions/A/DTPerformanceSession
Referenced from: /Users/Danger/Library/Developer/Xcode/DerivedData/HSCountingInputStream-dbhgckaaqtaiqueimpvpxllvygvt/Build/Products/Debug/HSCountingInputStream
Reason: image not found
追溯:
* thread #1: tid = 0x5e40d, 0x00007fff5fc0109d dyld`dyld_fatal_error + 1, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
frame #0: 0x00007fff5fc0109d dyld`dyld_fatal_error + 1
frame #1: 0x00007fff5fc02138 dyld`dyld::halt(char const*) + 79
frame #2: 0x00007fff5fc059bd dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2733
frame #3: 0x00007fff5fc01397 dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 761
frame #4: 0x00007fff5fc0105e dyld`_dyld_start + 54
注意:DTPerformanceSession.framework位于路径: /Applications/Xcode.app/Contents/Developer/Library/Frameworks
Note: DTPerformanceSession.framework is at path: /Applications/Xcode.app/Contents/Developer/Library/Frameworks
推荐答案
See the great page: Using code generated flags to debug with Instruments. Basically one just needs to add the framework, build and remove the framework, it is needed only for Xcode to find the include and only once. Alternatively add the framework and mark it "Optional".
这篇关于添加DTPerformanceSession.framework会导致应用在运行时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!