0

In my iPhone application I am calling a webservice using JSON. And I using NSJSONSerialization for retrieving the data from service. I am getting crash at random points when I run the app. Here is the screen shot of the issue. screen shot

Can someone please check it? If need more code, please let me know. Thanks in advance.

Mithuzz
  • 1,091
  • 14
  • 43
  • 2
    And what is the message in the exception? – trojanfoe Mar 01 '13 at 07:34
  • 2
    Check if `currentResult` is nil before `NSJSONSerialization` is called... – jjv360 Mar 01 '13 at 08:10
  • @trojanfoe I didn't get any message in the log, i added a exception break point, so i could track the exact point. – Mithuzz Mar 01 '13 at 08:16
  • @jjv360 I will do that. So, if the currentResult is nil, will that cause the issue? – Mithuzz Mar 01 '13 at 08:17
  • 1
    Yes it can, you need to do a `if (currentResult == nil) { /* Failed... */ }` before trying to parse it... – jjv360 Mar 01 '13 at 08:18
  • 2
    You need to *Continue* in the debugger so that the exception message will be logged. – trojanfoe Mar 01 '13 at 08:39
  • Ok, I will do. Also, we can see some function calls in the left side of the image right? How can I understand the reason for it from that? I am getting some crash at some other points also, I just want to understand the exact reason for that. – Mithuzz Mar 01 '13 at 10:00
  • The exact reason for an exception is typically expressed by the exception message as @trojanfoe is suggesting. Get that and share it here to help debug the issue. – bneely Feb 22 '14 at 07:06

0 Answers0