2

I'm relatively new to XCode (4.5) and i've ran into some problems with finding an error.

My project has suddenly started throwing out the following error when I attempt a model segue to open a view where I can add an item to a list - this previously was working.

"...-[TestUnit isEqualToString:]: unrecognised selector sent to instance 0x89d4250"

I've had a google around using breakpoints and I've added an "All Exceptions Breakpoint" to my breakpoints list but it's made no difference, my console still isn't terribly helpful to me (in my new eyes), I've no idea where in my project this error is...

I've used NSLog to trace out to the console and the error appears to be occuring within prepareForSegue and I've even commented out every occurence of isEqualToString within the project and the error is still thrown...

Would anyone mind giving me some much needed pointers to get to the bottom of this?

Many thanks,

Matt

6
  • We need to see some of the code Commented Oct 26, 2012 at 12:02
  • look for places where you assign a TestUnit object to something (e.g. foo.something = testUnit; or [foo setSomething:testUnit]). If that something is a NSString property you will see that error. Commented Oct 26, 2012 at 12:03
  • can u paste ur code..what u are actually passing Commented Oct 26, 2012 at 12:03
  • @MatthiasBauch Genius! I had looked for where it was being assigned but had overlooked what a method was returning (NSString) and had missed out accessing the TestUnit's property. Thanks! :) Commented Oct 26, 2012 at 12:25
  • 1
    Nothing beats experience. Next time you know where to look. ;-) Make sure you don't ignore compiler warnings, your project should compile without warnings (exceptions may apply, e.g. warnings about deprecated code). I have the feeling that there was a warning about wrong return type or wrong assignment. If you find a bug that you can't track down it's often useful to run the analyzer and look at its messages. And try to read something about stack traces. Commented Oct 26, 2012 at 12:57

1 Answer 1

2

Goto to Xcode -> breakpoint navigator -> add + -> "add exception Breakpoint" -> run project

once exception occur check where is crashed, Print objects reference, it have desire value or not?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.