How to debug crash on startup of 64-bit build
How to debug crash on startup of 64-bit build
- Subject: How to debug crash on startup of 64-bit build
- From: "Jeffrey J. Early" <email@hidden>
- Date: Tue, 06 Jul 2010 12:47:25 -0400
I just transitioned my (primarily Cocoa based) code from building 32-bit i386/PPC, to also include x86_64. Unfortunately, when launching the 64-bit version I'm getting a crash at launch and I can't figure out how to debug it. Stack trace at the bottom of the email.
- The crash does *not* occur when the application (either release or debug build) is launched within Xcode.
- The crash *does* occur if I launch the app with gdb from the command line (same stack trace).
- I have confirmed that all the dependencies are built x86_64 by using 'file' to make sure the architecture is represented in all dependencies.
- I have the same crash building everything with GCC 4.2 as well as LLVM 1.5.
- The 32-bit version launches without any issues.
- The debug build is x86_64 only, so I can confirm that Xcode isn't somehow launching a 32-bit version.
Can anybody offer any tips on how to debug this crash?
Thanks,
Jeffrey
----------------------
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
objc[9001]: garbage collection is ON
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8300a715 _read_images + 1617
1 libobjc.A.dylib 0x00007fff83020835 map_images_nolock + 1266
2 libobjc.A.dylib 0x00007fff830099a0 map_images + 114
3 dyld 0x00007fff5fc0395f dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 763
4 dyld 0x00007fff5fc04469 dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 442
5 libSystem.B.dylib 0x00007fff8773900c dyld_register_image_state_change_handler + 88
6 libobjc.A.dylib 0x00007fff8300991a _objc_init + 58
7 dyld 0x00007fff5fc0d500 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 228
8 dyld 0x00007fff5fc0bcec ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 236
9 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
10 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
11 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
12 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
13 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
14 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
15 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
16 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
17 dyld 0x00007fff5fc0bda6 ImageLoader::runInitializers(ImageLoader::LinkContext const&) + 58
18 dyld 0x00007fff5fc0210e dyld::initializeMainExecutable() + 133
19 dyld 0x00007fff5fc06981 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**) + 2993
20 dyld 0x00007fff5fc016d2 dyldbootstrap::start(macho_header const*, int, char const**, long) + 799
21 dyld 0x00007fff5fc01052 _dyld_start + 42
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00000001001eb100 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000100703c80 rsi: 0xffffffffffffffff rbp: 0x00007fff5fbfbb50 rsp: 0x00007fff5fbfbaa0
r8: 0x00000001007fc0a0 r9: 0x00000001007fc0a4 r10: 0x0000000000000013 r11: 0x0000000100714b10
r12: 0x0000000000000000 r13: 0x0000000000000008 r14: 0x0000000100701690 r15: 0x00000001001ecb08
rip: 0x00007fff8300a715 rfl: 0x0000000000010202 cr2: 0x0000000000000020
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden