A lot of crash reports coming in with this theme. What could be causing this? It’s never in the same place twice. I am using AQXMLParser but the crashes are always in some place unconnected to that. I’m not looking for help to diagnose the specific cause of this issue, Seems like some bad memory management in the XML parser delegate (written before I came onboard). So my question: Is there is some class of programming error that would exhibit this behavior? I’d like to learn so I know what to look for in the future.
0 <MY APPLICATION> ✭ <SOME RANDOM CLASS THAT HAS NOTHING TO DO WITH XML PARSING>.m line 687
-[<SOME RANDOM THAT HAS NOTHING TO DO WITH XML PARSING>:] + 687
1
...
libxml2.2.dylib
__xmlRaiseError + 898
2 libxml2.2.dylib
xmlFatalErr + 952
3 libxml2.2.dylib
xmlParseEntityRef + 104
4 libxml2.2.dylib
xmlParseReference + 270
5 libxml2.2.dylib
xmlParseTryOrFinish + 1422
6 libxml2.2.dylib
xmlParseChunk + 212
7 MyApplication AQXMLParser.m line 1238
-[AQXMLParser stream:handleEvent:] + 1238
8 CoreFoundation
_signalEventSync + 74
9 CoreFoundation
_cfstream_shared_signalEventSync + 240
10
...
CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
11 CoreFoundation
__CFRunLoopDoSources0 + 212
12 CoreFoundation
__CFRunLoopRun + 646
13 CoreFoundation
CFRunLoopRunSpecific + 356
14 CoreFoundation
CFRunLoopRunInMode + 104
15 Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 254
16 MyApplication AQXMLParser.m line 1115
-[AQXMLParser inputRunRunLoopInMode:] + 1115
17 MyApplication AQXMLParser.m line 1164
This turned out to be a bug in an old version of AQXMLParser. Updating to the latest fixed it.