I'm getting an abort under very limited circumstances and I'm trying to find out what statement or statements is causing it. The console says:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSPathStore2 setDelegate:]: unrecognized selector sent to instance 0x1d50dcb0'
NSPathStore2 doesn't appear anywhere in my code so that must be called by some framework I'm using. The instance address doesn't appear anywhere else so I can't tell what that is.
I tried using breakpoints to catch when the abort happens, but then it doesn't happen any more. So maybe it's a timing problem. I read in other posts that NSPathStore2 is part of NSString so I tried putting print statements around various string statements but that didn't help. Searching developer.apple.com for NSPathStore2 doesn't find anything.
I think the abort happens during an init method but that method is long and it calls other long methods before it's done. Also, it only happens after running through a 5-minute sequence of actions and only after a fresh install from Xcode. If I run the app a second time it doesn't abort. So it's very time consuming trying to find where this is coming from.