在从Testflight上传并加载应用程序后,我在运行自己的应用程序时出现了奇怪的崩溃(尽管当我直接从Xcode运行应用程序时没有崩溃)。
.ips文件显示发生崩溃的位置:
Application Specific Backtrace 0:
0 CoreFoundation 0x00007ff81bc8b773 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff81b9ebbc3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff81bbbcf16 -[__NSSingleObjectArrayI objectAtIndex:] + 112
3 Find Any File 0x000000010dd11b74 Find Any File + 637812
4 Find Any File 0x000000010dce1106 Find Any File + 438534
5 AppKit 0x00007ff81e6a2e7e -[NSClassSwapper initWithCoder:] + 1125
6 UIFoundation 0x00007ff81f535583 UINibDecoderDecodeObjectForValue + 703
7 UIFoundation 0x00007ff81f5352b7 -[UINibDecoder decodeObjectForKey:] + 253
8 AppKit 0x00007ff81e61c977 -[NSNibConnector initWithCoder:] + 97
9 AppKit 0x00007ff81e61c8b2 -[NSNibOutletConnector initWithCoder:] + 404
10 UIFoundation 0x00007ff81f535583 UINibDecoderDecodeObjectForValue + 703
11 UIFoundation 0x00007ff81f5357a5 UINibDecoderDecodeObjectForValue + 1249
12 UIFoundation 0x00007ff81f5352b7 -[UINibDecoder decodeObjectForKey:] + 253
13 AppKit 0x00007ff81e61b698 -[NSIBObjectData initWithCoder:] + 170
14 UIFoundation 0x00007ff81f535583 UINibDecoderDecodeObjectForValue + 703
15 UIFoundation 0x00007ff81f5352b7 -[UINibDecoder decodeObjectForKey:] + 253
16 AppKit 0x00007ff81e6a1a92 -[NSNib _instantiateNibWithExternalNameTable:options:] + 526
17 AppKit 0x00007ff81e6a178f -[NSNib _instantiateWithOwner:options:topLevelObjects:] + 143
18 AppKit 0x00007ff81ee2297f -[NSStoryboard _instantiateMainMenu:] + 189
19 AppKit 0x00007ff81e60cbee NSApplicationMain + 712
20 dyld 0x0000000117ab652e start + 462
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff81bb12ffe __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff81bb491ff pthread_kill + 263
2 libsystem_c.dylib 0x7ff81ba94d24 abort + 123
3 libc++abi.dylib 0x7ff81bb05082 abort_message + 241
4 libc++abi.dylib 0x7ff81baf625d demangling_terminate_handler() + 266
5 libobjc.A.dylib 0x7ff81b9f2e11 _objc_terminate() + 96
6 libc++abi.dylib 0x7ff81bb044a7 std::__terminate(void (*)()) + 8
7 libc++abi.dylib 0x7ff81bb06eeb __cxa_rethrow + 99
8 libobjc.A.dylib 0x7ff81b9fcd6c objc_exception_rethrow + 37
9 UIFoundation 0x7ff81f535cb1 UINibDecoderDecodeObjectForValue + 2541
10 UIFoundation 0x7ff81f5352b7 -[UINibDecoder decodeObjectForKey:] + 253
11 AppKit 0x7ff81e6a1a92 -[NSNib _instantiateNibWithExternalNameTable:options:] + 526
12 AppKit 0x7ff81e6a178f -[NSNib _instantiateWithOwner:options:topLevelObjects:] + 143
13 AppKit 0x7ff81ee2297f -[NSStoryboard _instantiateMainMenu:] + 189
14 AppKit 0x7ff81e60cbee NSApplicationMain + 712
15 dyld 0x117ab652e start + 462
正如你所看到的,“回溯0”在第3行和第4行显示了我的应用程序的(查找任何文件)调用,我想知道它在我的源代码中的位置。
下面还有来自线程的堆栈跟踪,但这没有帮助。
现在,当我在Xcode的Organizer中查看相同的崩溃时,我看到了这个:
但是,这显示了错误的堆栈跟踪!也就是说,它显示了线程的堆栈跟踪,其中没有用于调试此问题的有用符号。我需要看到的是Backtrace 0的跟踪,其中包含了我的代码对objectAtIndex:
消息的调用。
类似地,当我点击“在项目中打开...”按钮时,我最终得到了同样错误的堆栈视图:
为什么Xcode会出错呢?我该如何解决这个问题,这样我就可以得到“Find Any File + 637812”的实际源代码,向我展示访问越界数组索引的那一行?
1条答案
按热度按时间8mmmxcuj1#
你可以减去
0x000000010dd11b74
和637812
,得到FaF的基址。然后你可以打开hopper中的二进制文件,改变基址,看看0x000000010dd11b74
中的内容。