Question

I'm running my ios app in ipad 1, the following crash happen sometime while app is running, i don't know where the crash happen. This mostly happen in ios 5.1.1 . Here the crash log,

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xf0000008
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x3387ef78 objc_msgSend + 16
1   UIKit                           0x333ffa3a -[UIViewController unloadViewForced:] + 254
2   UIKit                           0x335473a6 -[UIViewController purgeMemoryForReason:] + 58
3   Foundation                      0x3507a4f8 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 12
4   CoreFoundation                  0x35c2c540 ___CFXNotificationPost_block_invoke_0 + 64
5   CoreFoundation                  0x35bb8090 _CFXNotificationPost + 1400
6   Foundation                      0x34fee3e4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
7   Foundation                      0x34fefc14 -[NSNotificationCenter postNotificationName:object:] + 24
8   UIKit                           0x335120e6 -[UIApplication _performMemoryWarning] + 74
9   UIKit                           0x335121e0 -[UIApplication _receivedMemoryNotification] + 168
10  libdispatch.dylib               0x33ffb252 _dispatch_source_invoke + 510
11  libdispatch.dylib               0x33ff8b1e _dispatch_queue_invoke$VARIANT$up + 42
12  libdispatch.dylib               0x33ff8e64    _dispatch_main_queue_callback_4CF$VARIANT$up + 152
13  CoreFoundation                  0x35c332a6 __CFRunLoopRun + 1262
14  CoreFoundation                  0x35bb649e CFRunLoopRunSpecific + 294
15  CoreFoundation                  0x35bb6366 CFRunLoopRunInMode + 98
16  GraphicsServices                0x33951432 GSEventRunModal + 130
17  UIKit                           0x3338ecce UIApplicationMain + 1074
18  MY Game                         0x00079a90 0x75000 + 19088
19  MY Game                         0x00079a50 0x75000 + 19024

As i understand from crash log, crash not happen due to my code. It's due low memory. Is that correct? How to find where the crash happen? Any suggestions.

Was it helpful?

Solution

As i understand from crash log, crash not happen due to my code. It's due low memory. Is that correct?

No, that's not correct.

Low memory is being reported, but your view controller is not responding properly. The most common cause of this is a retain cycle - see UIViewController purgeMemoryForReason: Crashing on iOS 5. In that answer, the retain cycle is in SVPullToRefresh , but yours could be elsewhere. The most common cause of retain cycles is not setting a delegate property to weak.

Once you figure out where the issue is, you can set breakpoints in viewDidUnload and ``didReceiveMemoryWarning`, simulate a memory warning, and step through your code to find the error.


Symbolication

Additionally, this crash report isn't symbolicated. Typically you'll want to symbolicate your crash report first. For example, see these lines:

18  MY Game                         0x00079a90 0x75000 + 19088
19  MY Game                         0x00079a50 0x75000 + 19024

In this case, as pointed out by Kerni, those two will just show start and main, so they won't help you in this instance. But generally, you should symbolicate your crash reports. (Search for "Xccode symbolicate crash logs" if you don't know how to do this.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top