0

The problem is when I write a Letter like "Pasar" the error not showing, but when I press space the error like exc_bad_access showing, why can it be? any one can't tell me about exc_bad_access..

I'am using xcode 4.2 and build at iPhone 5.0 Simulator.

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
user4951
  • 32,206
  • 53
  • 172
  • 282

2 Answers2

1

Try using NSZombies. In your project info, set NSZombieEnabled to YES. Read this to enable NSZombie in your project.

Its just a memory management problem. You'll be releasing something earlier and then using it or you'll be using some variable which doesnt have memory allocated to it. NSZombie will tell you where the app got crashed.

mayuur
  • 4,736
  • 4
  • 30
  • 65
0
[self setSearchResults:[self.array filteredArrayUsingPredicate:resultPredicate]];

Your search result is deallocating instead of using "=" assign value to setSearchResults use this.

kleopatra
  • 51,061
  • 28
  • 99
  • 211
Ahmad Ishfaq
  • 914
  • 1
  • 8
  • 10