AlanQuatermain / aqtoolkit

A toolkit consisting of a bunch of generally useful routines and extensions I wrote when putting together other projects.
http://blog.alanquatermain.net/code
BSD 3-Clause "New" or "Revised" License
785 stars 149 forks source link

Handling of input stream error #6

Open ghost opened 13 years ago

ghost commented 13 years ago

I am new to Objective C and your streaming XML parser, but I ran into problem when network error occurs. I wanted to know if this is correct: In AQXMLParser.m at line 963: _internal->error = [input streamError];

Should this be: _internal->error = [[input streamError] retain];

When this error occurs, then the parser is released, I get a crash in -dealloc at the line: [_internal->error release];

with this error message: -[CFError release]: message sent to deallocated instance

AlanQuatermain commented 13 years ago

Yes, good catch— it should indeed be retained. I'll tweak it and push the changes. In fact, I think there might be some other similar changes in the Kobo app to move across.

marcusramberg commented 13 years ago

Funny. I just fixed this error in our app and was about to report it :)