iphone - iOS app, classes suddenly vanish, crash in alloc -
It's odd to turn on and off as I'm working on my application, this problem is popped up, and Then it has always disappeared mysteriously. Today it is refusing to disappear.
My app uses two view controllers to handle automatic rotation Occasionally, purpose-can not find my classes. For example [OneViewController alloc] will crash I have added a function to capture this situation, and even if I call it before running a line of my code, things still break down Are there. I take it to prove that whatever is wrong, it is not from any bad code written by me.
Anyone have any idea why universality will not be a stable?
Unverified Universal Goodness () {id portrait_class, landscape_class; Portrait_class = NSClassFromString (@ "OneViewController"); Landscape_class = NSClassFromString (@ "Other ViewController"); NSLog (@ "Checking Goodness: Portrait% @, Landscape% @", Portrait_class, Landscape-Class); If (portrait_class == NiL) Landscape-class == zero exit (0); } Int main (int argc, char * argv []) {verifyUniversalGoodness (); NSAutoreleasePool * pool = [[NSAUTOriasius Alok] Init]; Int retVal = UIApplicationMain (argc, argv, zero, zero); [Bridge release]; Return rate; }
It is that I have a stack trace looks What if I went to call it alloc ...
# 1 0x3356296c _class_initialize () # 2 0x33567dfe in preparedForMethodLookup () # 3 0x33565168 in lookUpMethod () # 4 0x33562914 _class_lookupMethodAndLoadCache () # 5 0x3356264a in objc_msgSend_uncached () # 6 in 0x000de704 - [MyAppDelegate finishStartup] (self = 0x61c9a0, _cmd = 0x303117) / users In GSEventRunModal () # 11 0x30d62186 in GSEventRun () # 12 0x314d54c8 in # 10 0x30d620da / ## 0x32c23d22 CFRunLoopRunSpecific () # 9 0x32c234e0 in / Michael Toy / Project / MapdileGet.MM: 180 # 7FireDelayedPerform () [UIApp lication _run] () # 13 UIApplicationMain (in 0x314d39f2) # main 14 0x000e13a8 (argc = 1, argv = 0x2ffff5a8)
thanks for all your responses that I was looking around this problem is to know that I care about the class She is in a library, and the main is in another library, and both libraries have been added to my last binary.
You should join me Wl, -ObjC link line for me, and there are certain things and universal, is now restored goodness. I do not know that there was a need due to which the state, but I'm happy to be back in business.
Comments
Post a Comment