views:

131

answers:

1

I wrote iPhone application using core data. When I run application in simulator, its crashing with following error:

2010-02-12 17:24:22.359 CrData[46122:4503] Unresolved error Error Domain=NSCocoaErrorDomain Code=513 UserInfo=0x3f484e0 "Operation could not be completed. (Cocoa error 513.)", { NSUnderlyingException = Error validating url for store; }

Next time on wards its running well. Again if I delete the application and run the application, its crashing again. Can some one tell me how to solve this problem.

+2  A: 

Put a breakpoint in on objc_exception_throw and then run it in the debugger. When it crashes it will break on throw and you can interrogate the value of the URL to see what is going wrong.

Marcus S. Zarra
Thanks a lot Marcus. But in my code there is no line of code "objc_exception_throw" to set the break point. can you please explain me in detail.
satyam
I googled and found how to add the break point in the code. I started the app, the app crashed with the same error message. But it didn't stop in debugger at all.
satyam
open the breakpoint editor and *type* `objc_exception_throw` or google for one of the dozens of tutorials on how to set a breakpoint. Once you have it set then run your application **in the debugger** so that it will stop on that call. I highly recommend spending an afternoon and learn how to use the debugger in Objective-C. You will gain a tremendous amount of coding skill in the process and it will be easier for you to develop your applications.
Marcus S. Zarra