jaketmp/ePub-quicklook — Issue #24: Very odd problems with tests failing
Author: chrisridd
Created: 2012-03-02 22:01:34+00:00
State: open

I can't see what's caused this, but a bunch of tests are failing because the JTPepub objects are "randomly" nil.

I think they're nil because mimetype (inside openEPUBfile) is wrong - NSlogging of mimetype shows:

Mar 2 21:43:03 aluminium otest[23787]: mimetype application/epub+zip
Mar 2 21:43:03 aluminium otest[23787]: mimetype application/epub+zip2007/ops
Mar 2 21:43:03 aluminium otest[23787]: mimetype application/epub+zipctions
Mar 2 21:43:03 aluminium otest[23787]: mimetype (null)

I tried using NULL instead of my mmapped I/O stuff, no change.

Something's up, I think with memory somewhere. I think the init methods for ZipArchive are screwy - self = [self init] for example. Deleting the (useless) init method might help. Also you must call [self release] on failures, not [self dealloc]. The unit tests call setUp and tearDown for **every** test case, so they do exercise memory quite a bit.

I'm not sure what the best way of debugging memory problems like this is in Xcode...