nszombie

Having a zombie issue on UISearchDisplayController

做~自己de王妃 提交于 2019-12-08 19:45:48
问题 I am having a zombie while using a UISearchDisplayController with a UITableView. The UISearchDisplayController (and the rest of the view) is set via interface builder (storyboard on xcode 5 and using ARC and iOS 7 only). The searchDisplayController is used by these 2 methods -(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [self filterContentForSearchText:searchString scope: [[self.searchDisplayController

EXC_BAD_ACCESS While switching tabControllers

社会主义新天地 提交于 2019-12-08 10:24:53
问题 I've built an app with three tab controllers. Inside my "Tab1" I'm having dashboard Table.If I click in one of the cell i get a address book table. Now the requirement is when I click on the other Tab2 or Tab3 and come back to Tab1 I should get the first view of the tab1. I used the following code to get this requirement in the Appdelegate - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{ if(self.tabbarController

View Controller getting a message sent to it after release, causes a crash

旧街凉风 提交于 2019-12-08 06:28:15
问题 I have a setup where I am presenting a UIPickerViewController (modally) and then some more controllers get pushed on the stack for image editing. If I hit the back button and get to the root view controller , then hit another tab, the app crashes. This is the crash message: -[PostPhotoViewController respondsToSelector:]: message sent to deallocated instance 0x19b16a60 I ran Zombies instruments and it looks like the last View Controller (PostPhotoViewController) that was on the stack is

How to demonstrate memory leak and zombie objects in Xcode Instruments?

时光怂恿深爱的人放手 提交于 2019-12-08 03:49:10
问题 I would like to demonstrate memory leak and zombie object in Xcode Instruments on a class. I've found it pretty hard to trigger on purpose, especially with ARC turned on. Do you know how could I create them? 回答1: For A leak: Create two classes, A and B. A should have an @property that strongly references an instance of B. B should have an @property that strongly references an instance of A. A *a = [A new]; B *b = [B new]; a.b = b; b.a = a; That'll create a leak. For a Zombie Create a

XCode Instrument - Allocations Instrument not finding zombies

不想你离开。 提交于 2019-12-07 20:25:08
问题 I'm running Xcode 4.4.1 and building an iOS app. My app is crashing and has a memory issue (I know because it is crashing on objc_msgSend ). So I am running the Zombies Instruments tool. The problem is, it runs without error and no help about my zombies: If I turn off Zombie detection then the program crashes predictably. Am I using the Zombie tool incorrectly? Or does this indicate I have a different problem? useless stack trace follows... #0 0x0212a09b in objc_msgSend () #1 0x01bd36b7 in -

XCode Instrument - Allocations Instrument not finding zombies

我们两清 提交于 2019-12-06 13:27:10
I'm running Xcode 4.4.1 and building an iOS app. My app is crashing and has a memory issue (I know because it is crashing on objc_msgSend ). So I am running the Zombies Instruments tool. The problem is, it runs without error and no help about my zombies: If I turn off Zombie detection then the program crashes predictably. Am I using the Zombie tool incorrectly? Or does this indicate I have a different problem? useless stack trace follows... #0 0x0212a09b in objc_msgSend () #1 0x01bd36b7 in -[NSError dealloc] () #2 0x0212ae3d in _objc_rootRelease () #3 0x01bc1f28 in -

respondsToSelector send to deallocated object

谁说胖子不能爱 提交于 2019-12-04 09:33:43
I try to find out why my app crashes (RSS Reader) if I send a wrong URL to NSXML Parser. I got an EXC_BAD_ACCES S. So after some Searching I found out that I have to use Zombies. So I added the following arguments to the environment: CFZombieLevel = 3 NSMallocStaclLogging = YES NSDeallocateZombies = NO MallocStackLoggingNoCompact = YES NSZombieEnabled = YES NSDebugEnabled = YES NSAutoreleaseFreedObjectCheckEnabled = YES I also added malloc_error_break as breakpoint. Then I added some other breakpoints in the GUI and pressed Build and Debug. In the console I get the following message: 2010-08

How to debug EXC_BAD_ACCESS that occurs only on release target for an iPhone app?

眉间皱痕 提交于 2019-12-03 16:07:17
问题 I'm developing an iPhone application. I have an EXC_BAD_ACCESS that occurs only in the release target; when I build the debug target the exception does not occur. However, when I set the NSZombieEnabled environment variable to YES , I still get the EXC_BAD_ACCESS with no further information. Is it even possible for NSZombieEnabled to work when executing the release target? I don't see why not, since gdb is running in both cases... Update : here is a printout of the top of the stack: #0

iOS libsystem_c.dylib strdup memory leak NSZombie not working

一笑奈何 提交于 2019-12-03 09:51:35
问题 Please help me track down an iOS memory leak. Thanks! I'm using xCode 4.0.1 and I tried to activate NSZombie to track a memory leak, but it doesn't seems to work as before, with xCode 3.x I can't find out where the memory leak is coming from, as Instruments points this out: Leaked Object -> GeneralBlock-32 Address -> 0x4c8600 Size -> 32 Bytes Responsible Library -> libsystem_c.dylib Responsible Frame/Caller -> strup At this point I don't know If I'm using Instruments with NSZombie the right

How to turn off NSZombieEnabled in Xcode 4

这一生的挚爱 提交于 2019-12-03 06:25:33
I have just migrated to Xcode 4 and i had zombie activated in Xcode 3 for my app. I used the following method: Go to Project -> Edit Active Executable Click Arguments Click + in the "Variables to be set in the environment" section Enter NSZombieEnabled in the Name column and YES in the Value column. Make sure the checkmark for the NSZombieEnabled entry is checked. Now i want to make sure it is off for my application but do not understand how to check/do that in XCODE4, anyone that can share some light on that? To edit environment variables, go to Menu Product / Edit Scheme…, select the desired