Open lenkawell opened 12 years ago
Our users are running iOS 5.1 and I noticed that connection:didReceiveData: is deprecated as of iOS 4.3.
No, the deprecation notice is just a weird side effect of breaking NSURLConnectionDelegate up into multiple protocols. The method still exists and is in the NSURLConnectionDataDelegate protocol.
It looks as though the data
parameter to -[RESTOperation connection:didReceiveData:]
was corrupted somehow — it's not nil, but its data seems to be a bogus pointer (0x00000010?) No idea how this could happen, unless it's a result of TDURLProtocol sending a bad data object to the client?
Also I note that this request is getting the body of an attachment, so the data comes from the mapped contents of the attachment file…
Aha, I see, I was confused by the deprecation documentation.
Any ideas on what may be causing the crash? Is it something I may be doing wrong?
Len, is this a regression? If so, what are the current and previous versions of TouchDB and CouchCocoa? There were some recent changes to the way attachment data is returned in TouchDB (568e267fe03b) but I don't see how it could cause this.
And no, I don't think it's your fault. It really looks like TouchDB is returning a bogus data object, I just don't see how.
It might be a regression, since I can't find any of these crashes logged prior to moving to TouchDB 0.92 which I pulled and built on 8/8/12. The CouchCocoa was also pulled and built on 8/8/12. Since then, I have quite a few of these crashes.
0.92 predates the router content-range changes I was thinking of, so that couldn't be it. I've looked at the changes made since 0.92 and none of them seem to fix anything that could have caused bad data to be returned from the router...
Sorry, but I re-checked and the version that TouchDB reports is 0.93 (my mistake). I'm not sure when you bumped it to 0.93 from 0.92, but I definitely pulled and built it on 8/8/12, so anything changed prior to that is what I should have.
Git show says:
commit f6cf0b1c4cd2084c5496144a9feff88d96183dc4 Author: Jens Alfke jens@couchbase.com Date: Wed Aug 8 14:37:54 2012 -0700
Our users are getting regular crashes in RESTOperation that look like the enclosed stack trace. I don't quite see what the problem may be but it seems like it's crashing on the mutablecopy. Our users are running iOS 5.1 and I noticed that connection:didReceiveData: is deprecated as of iOS 4.3.