-1

When my program crash, I'm only getting this warning NSScanner: nil string argument in the debug window.

And I did not use the class NSScaner

How do I resolve this problem ?

  • Show the whole error message, show the line where is crash. An use of `NSScanner` may be done in the code of a method that "you don't see". – Larme Mar 04 '15 at 10:40
  • whenever crashed,I can only get debug message as 2015-03-04 18:19:47.605 Ymatou[4234:1894498] NSScanner: nil string argument 2015-03-04 18:19:47.605 Ymatou[4234:1894498] NSScanner: nil string argument libc++abi.dylib: terminate_handler unexpectedly threw an exception – user2645382 Mar 04 '15 at 10:59
  • Try to find out which line causes the crash. – Larme Mar 04 '15 at 12:11
  • possible duplicate of [Obj-C, NSScanner: nil string argument, suddenly getting this warning, how do I fix it?](http://stackoverflow.com/questions/8113139/obj-c-nsscanner-nil-string-argument-suddenly-getting-this-warning-how-do-i-f) – Artjom B. Jun 16 '15 at 15:55
  • Or check @Jeremy W. Sherman's answer to http://stackoverflow.com/questions/7095174/what-causes-nsscanner-nil-string-argument. NSDecimal initwithString: produces this error as well. – Elise van Looij May 20 '16 at 14:18

1 Answers1

0

You may get this warning if you take a nil object as the argument of some method. So, find out the scope where this error could take place and check all methods carefully, especially those who takes string as the argument

sevenkplus
  • 178
  • 1
  • 12