nicklockwood / XMLDictionary

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#xml-dictionary
Other
1.14k stars 235 forks source link

XMLDictionary Crashing when being used within NSURLSessionDataTask Completion block #38

Open RollingGoron opened 9 years ago

RollingGoron commented 9 years ago

I'm trying to use XMLDictionary to parse some RSS feeds within the NSURLSessionDataTask completion block. When using XMLData about 1/2 the RSS feeds crash XMLDictionary with "BAD_ACCESS". I tried to solve this by converting the NSData to NSString and using XMLString. This solved the "BAD_ACCESS" issue but now I'm getting "[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array" Specifically with this RSS Feed: http://feeds.ign.com/ignfeeds/podcasts/wii/

Now, if I parse the RSS feed OUTSIDE of the completion block, it works fine no problem. But when I try and parse it within the Completion block, I get s crashes.

Any idea how to solve this?