-1

I have nib file having lots of UIViews(More than 100), Also I am creating 500+ UIViews using Code.

Just FYI, Application is kind of Game board with Blocks.

Problem, Randomly application get crashed on nib objects while playing game. I am not able to make test case. But I can say that Application crashed on Nib objects(IBOutlet) only.

each time it throughs bad access on nib's IBOutlet only.

I tried by making IBOutlet property with retain. also synthesize properly, but getting the same problem randomly.

Please help me to manage nib objects.

Exact Error Message was : EXC_BAD_ACCESS

Here is Stacktrace

libobjc.A.dylib 0x3995e5aa objc_msgSend + 9
1WWS 0x00064437 0x5a000 + 42039
2WWS 0x00063b5d 0x5a000 + 39773
3Foundation 0x37df7539 + 200
4Foundation 0x37deedb9 + 840
5Foundation 0x37e673db + 102
6libdispatch.dylib 0x370b211f + 10
7libdispatch.dylib 0x370b14b7 + 22
8libdispatch.dylib 0x370b61bd + 224
9CoreFoundation 0x34d57f3b + 1290
10CoreFoundation 0x34ccaebd CFRunLoopRunSpecific + 356
11CoreFoundation 0x34ccad49 CFRunLoopRunInMode + 104
12GraphicsServices 0x3261d2eb GSEventRunModal + 74
13UIKit 0x342a72f9 UIApplicationMain + 1120
14WWS 0x0005b09f 0x5a000 + 4255
jaym
  • 1,253
  • 13
  • 18

1 Answers1

0

One way to test whether IBoutlet causing problem or not is, Disconnect all IBoutlet view. Instantiate them in view didLoad method and try running your app. If app still crashes then consider it is memory issue.

If app is not crashing then it is might be IBoutlet issue only.

Another way is to use Instruments tool.

  1. Use product -> Analyze to check any memory leaks in your code.
  2. Run product -> profile -> Leaks tool check runtime leaks.
SangamAngre
  • 809
  • 8
  • 25