Try as I can, and following directions in
ftp://mail.tprd.info/help_iOS_1.7.pdf, PDFViewer keeps crashing on Document_openMem (and also on Document_open).
Relevant code fragment:
- (int)PDFOpenURL:(NSURL *)url withPassword:(NSString *)pwd
{
[self PDFClose];
PDF_ERR err = 0;
const char *password = [pwd UTF8String];
NSData *data = [[NSData alloc] initWithContentsOfURL:url];
void *rawData = (void *)(data.bytes);
int size = data.length;
m_doc = Document_openMem(rawData, size, password, &err);
//...
All the data looks normal & correct.
Tried lots of variations (not that there’s much to change, it’s a pretty straightforward call).
It just keeps crashing on that call with EXC_BAD_ACCESS.
Thoughts? probably something petty, but I'm not seeing it and can't look past the call as it's in the PDFViewer library.