Interesting NSInternalInconsistencyException with ofPoint

I seem to be getting the following exception and app crash:

‘NSInternalInconsistencyException’, reason: ‘There can only be one UIApplication instance.’

I traced it back to the use of an ofPoint declaration in a header file. One of the strange things is that I already have another ofPoint declared at the top of the same header file.

class Callout {  
    ofPoint firstPoint;  
    ofPoint secondPoint;  

For some reason, if I keep that declaration of “secondPoint” in, the app will eventually crash. It runs for a while, but then crashes after a few seconds of user interaction. If I take it out (and replace it with a bunch of floats), the app works fine. I don’t even have to use the “secondPoint” in order to crash the app. The second declaration is enough to throw the exception.

Not knowing the internals of OF, I’m sorry for not being able to provide more helpful information.

Does anyone know why this is happening? I’m OK working around it, but thought it might point to a larger issue.

Thank you,

Well that sounds pretty bizarre. I doubt it’s got much to do with your ofPoint declaration at all. My guess would be either you’re doing something wrong with your project setup/project structure or you’ve got some kind of bad memory access happening. So my vote goes with the “larger issue” theory.

Hi DavidDC,

Yeah, it corresponds to a bad memory access. But, it only shows up when the declaration is there. I’ll play around with it and see if I can find anything else out.