ARC
ARC

Reputation: 1804

Help interpreting stack trace

Thread 12 Crashed:
0   libsystem_kernel.dylib          0x3076da1c __pthread_kill + 8
1   libsystem_c.dylib               0x35c8a3b4 pthread_kill + 52
2   libsystem_c.dylib               0x35c82bf8 abort + 72
3   libstdc++.6.dylib               0x33f61a64 __gnu_cxx::__verbose_terminate_handler() + 376
4   libobjc.A.dylib                 0x360f506c _objc_terminate + 104
5   libstdc++.6.dylib               0x33f5fe36 __cxxabiv1::__terminate(void (*)()) + 46
6   libstdc++.6.dylib               0x33f5fe8a std::terminate() + 10
7   libstdc++.6.dylib               0x33f5ff5a __cxa_throw + 78
8   libobjc.A.dylib                 0x360f3c84 objc_exception_throw + 64
9   Foundation                      0x31af8dea _NSOutOfMemoryErrorHandler + 38
10  CoreFoundation                  0x31e91496 __CFStringHandleOutOfMemory + 22
11  CoreFoundation                  0x31e951ea __CFStringChangeSizeMultiple + 506
12  CoreFoundation                  0x31e982c0 __CFStringCheckAndReplace + 148
13  Foundation                      0x31a81228 -[NSCFString appendString:] + 28
14  MyApp                           0x00016a86 -[XMLParser parser:foundCharacters:] (XMLParser.m:109)

Crashed with SIGABRT on device.

XMLParser code snippet :

- (void)parser:(XMLParser *)parser foundCharacters:(NSString *)string
{
    if(!currentString)
    {
        currentString = [[NSMutableString alloc] init];
    }
        [currentString appendString:string]; // Line 109 that crashed   
}

Why does it crash there is it appending nil string ? or accessing protected memory

Upvotes: 2

Views: 723

Answers (1)

Georg Fritzsche
Georg Fritzsche

Reputation: 98994

The _NSOutOfMemoryErrorHandler makes it rather clear - you're running out of memory. Check for parts that are too memory-intensive for the device using Instruments and memory leaks etc.

Upvotes: 2

Related Questions