Archived Forum Post

Index of archived forum posts


C++ exceptions raised by Objective-C api?

Aug 20 '14 at 05:52


I have a number of crash reports that indicate that my iOS app has crashed with a SIGTRAP inside places like ckSevereError, XString::clear, LogBase::LogDataLong, Pkcs1::v1_5_decode, Pkcs7_EnvelopedData::loadXml, Pkcs7::loadPkcs7Der, Rsa2::decryptAndUnpad, DataBuffer::loadFileUtf8, ClsCrypt2::decryptData, LogEntry2::allowMoreSubEntries.

I'm assuming that a C++ exception is raised in those locations? It's idiomatic for Objective-C APIs not to raise any exceptions except for the case of programmer error (eg. missing arguments etc) and so the Chilkat API should trap any C++ exceptions and return an error in those cases (in the case of the Chilkat APIs I guess that would be placing the error string in lastErrorText since none have NSError outvar parameters).

Is that what is supposed to be happening? If not, I suggest that it should, but for now should I be wrapping all my Chilkat API calls with try/catch? And if so, can I ever do anything useful with the exception body?



Download and test using the latest version (v9.5.0.43)

If you already have the latest version, try this one:

If the problem still exists, please report back.