Adding new source files to project changes my call stack in the main application
I have my own plugin - a static library linked into my project. When I add Twitter+OAuth sources and compile them all, It changes the call stack in my main app causing EXC_BAD_ACCESS failure.
without Twitter source files (works fine):
#0 0x0051fc32 in registerMyOwnPluginCallback at MyPlugin.c:19
#1 0x00019b54 i开发者_运维百科n -[AppController applicationDidFinishLaunching:] at AppController.mm:1058
#2 0x308f15a4 in -[UIApplication _performInitializationWithURL:sourceBundleID:]
#3 0x308f117c in -[UIApplication _runWithURL:sourceBundleID:]
#4 0x309374b0 in -[UIApplication handleEvent:withNewEvent:]
#5 0x30936cf0 in -[UIApplication sendEvent:]
#6 0x3093687c in _UIApplicationHandleEvent
#7 0x3204696c in PurpleEventCallback
#8 0x30254a76 in CFRunLoopRunSpecific
#9 0x3025416a in CFRunLoopRunInMode
#10 0x308f0354 in -[UIApplication _run]
#11 0x308eea94 in UIApplicationMain
with Twitter source files (throws up EXC_BAD_ACESS):
#0 0x00533b8c in registerMyOwnPluginCallback at MyPlugin.c:17
#1 0x308f15a4 in -[UIApplication _performInitializationWithURL:sourceBundleID:]
#2 0x308f117c in -[UIApplication _runWithURL:sourceBundleID:]
#3 0x309374b0 in -[UIApplication handleEvent:withNewEvent:]
#4 0x30936cf0 in -[UIApplication sendEvent:]
#5 0x3093687c in _UIApplicationHandleEvent
#6 0x3204696c in PurpleEventCallback
#7 0x30254a76 in CFRunLoopRunSpecific
#8 0x3025416a in CFRunLoopRunInMode
#9 0x308f0354 in -[UIApplication _run]
#10 0x308eea94 in UIApplicationMain
#11 0x0001b8c4 in main at main.mm:18
I only added source files for compilation and didn't modify the starting code.
What can be the cause of this kind of behaviour?
before that you need to identify which object is leaking.
in the project folder, you click on executables and select your app and right click on that after that click on get info then add argument like NSZombieEnabled YES. Now clean all targets and run the app reproduce the same scenario then it will display the correct object. then fix it.
精彩评论