Strange error


after run and build a new app with default rtf for the about If I choose About the about appear.
If I run the app and the app process something at the end I choose About and I receive:

An uncaught exception was raised
*** setObjectForKey: object cannot be nil (key: Credits)

There is a way to fix and why that happen?

10.8.4 and Xcode 4.6.3


I found the error after a debug:

was a do shell script like this:

do shell script “/usr/bin/find " & quoted form of pPathAppPosix & " -type f -exec rm {} \;”

instead of the correct:
do shell script “/usr/bin/find " & quoted form of (pPathAppPosix & “apuTmp”) & " -type f -exec rm {} \;”

The command empty the tmp dir apuTmp and in the version that generates the error was pointed in the wrong dir.

But I can’t explain my self why it generates the previous error.



the exception is raised, when an object is added to a dictionary (record) where the value is nil (missing value)

Hi Stefan

The problem is that in my app I don’t manage records or NSDictionary in this case.


after investigating I discovered the trouble.
When a handler was invoked, the handler at the beginning empty the dirTmp.
But because the dirTmp was created at the same level of the app, in this case in debug mode inside the Derived Data and because for my error the tmpDir was not pointed correctly, ad the first process the app erased all the files inside the derived data.
So when first launched the about worked. After processing generate the “An uncaught exception was raised”.

So all is explained :wink: