5

Possible Duplicate:
iOS App crashing before entering main() with Xcode 4.2 & iOS 5

I am working on an app that works fine on simulator 4.3 but when I try it on simulator 5.0 it crashes before even reaching the main method. I get no informations, only gdb is available but the few I can ask him leads me nowhere.

Here's the stack-trace from gdb:

#0  0x00000000 in ?? ()
#1  0x95392ef3 in mig_get_reply_port ()
#2  0x9538c70c in mach_ports_lookup ()
#3  0x02845124 in _xpc_domain_init_local ()
#4  0x02842eb1 in _libxpc_initializer ()
#5  0x8fe7c15b in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#6  0x8fe7bcc0 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#7  0x8fe79220 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#8  0x8fe791b6 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#9  0x8fe791b6 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#10 0x8fe791b6 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#11 0x8fe791b6 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#12 0x8fe7a1c0 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#13 0x8fe6e656 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#14 0x8fe72ef2 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_ ()
#15 0x8fe6c2ef in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_ ()
#16 0x8fe6c063 in __dyld__dyld_start ()

Is it understandable for someone? Or how can I find more readable informations about that crash?

P.S. I'm working under XCode 4.2 Build 4D177b

Community
  • 1
  • 1
greg3z
  • 601
  • 6
  • 18
  • See this answer: http://stackoverflow.com/questions/7710163/ios-app-crashing-before-entering-main-with-xcode-4-2-ios-5/7757166#7757166 – Mark Granoff Oct 13 '11 at 23:20
  • Thanks for submitting this duplicate. The original has a screenshot of the stack trace so I could only find it via this one! – Ben Challenor Nov 30 '11 at 16:52

1 Answers1

2

Removing -weak_library /usr/lib/libSystem.B.dylib from your OTHER_LDFLAGS in Build Settings worked for me.

Scott Wolchok
  • 506
  • 3
  • 5