tags:

views:

86

answers:

1

I run the TTCatalog application from the Three20 library and encountered this error when click on the "Photo Thumbnails" of the "Three20 Catalog":

TTDASSERT failed: _cacheKey == request.cacheKey  

I look at the breakpoint and see that it is on line 119 of TTRequestLoader.m of the method addRequest.

I know that it failed to do the assertion of the cacheKey, but why this error appears even on the sample application, does anyone encounter the same error? What is the workaround of this?
Thanks,

P/S: I downloaded the Three20 from the git directory just yesterday. So I assume this be the newest one.

A: 

You can safely comment out those assertions. The next push will remove the assertions entirely.

They were added with the intention of flagging a strange design decision with TTURLRequestLoader, but turned out that it's actually a fairly prevalent assertion in practice.

featherless
Just pushed the fix.http://github.com/facebook/three20/commit/1264690cea43e3b53d60c71910b69d122ff6c2ff
featherless
Thank Jeff for your information. I would suggest that you do the unit test or some kinds of testing before pulling the codes. Users get frustrated when even the sample code Three20 Catalog raises the error.
sfa
Completely reasonable. Sadly the library lacks any comprehensive set of unit tests at this point so it's difficult to verify that any one code change doesn't break other parts of the code base. This is being worked on, though.That being said, this particular case is definitely frustrating because, as you said, it even asserted in the TTCatalog example.
featherless