Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Crash when incoming JSON record has a null DateTime value

#37

Excellent project! I am really impressed so far and am finding ObjectiveResource very useful. I did run into one crash when using JSON format and retrieve records when one of those records has a null DateTime value. This is the relevant log entry:

2009-02-09 00:01:28.370 TestApp[1144:20b] <= [{"alert": {"name": "Hourly Test", "repeat": "Hourly", "id": 1, "user_id": 1, "next": "2009-02-09T01:00:00-05:00"}}, {"alert": {"name": "Test Nil Date", "repeat": "None", "id": 24, "user_id": 1, "next": null}}]

2009-02-09 00:01:28.374 TestApp[1144:20b] *** -[NSNull length]: unrecognized selector sent to instance 0xa028f020

2009-02-09 00:01:28.375 TestApp[1144:20b] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSNull length]: unrecognized selector sent to instance 0xa028f020'

This did not occur when using XML format. I came up with the following change which seems to resolve this and does not break any of your unit tests:

https://gist.github.com/69871546...

Thanks again for a very impressive project and I hope this is helpful.

Reported by Adam Alexander · February 9th, 2009 @ 12:24 AM

State: resolved
Assigned to: jjburka jjburka

Activity

  1. Joshua Vickery
    Joshua Vickery
    • Milestone set to ObjectiveResource 1.01

    looks like a nice fix

    thanks Adam!

    February 9th, 2009 @ 12:37 PM

  2. jjburka
    jjburka
    • Assigned user set to jjburka

    February 9th, 2009 @ 05:17 PM

  3. jjburka
    jjburka
    • Assigned user changed from jjburka to Joshua Vickery

    made a unit test , and hooked up google unit tests. I just set the default build action to run the unit tests.

    February 10th, 2009 @ 02:47 PM

  4. Joshua Vickery
    Joshua Vickery
    • Assigned user changed from Joshua Vickery to jjburka

    I'm not seeing any changed on github: http://github.com/yfactorial/obj...

    did you push them?

    February 10th, 2009 @ 04:17 PM

  5. jjburka
    jjburka

    i pushed it to the objectivesupport , I figured it would be better for the ticket to be closed before I updated OR

    February 10th, 2009 @ 04:39 PM

  6. Joshua Vickery
    Joshua Vickery
    • Assigned user changed from jjburka to Joshua Vickery

    found it: http://github.com/yfactorial/obj...

    I emailed Ryan to see if he can make the github/lighthouse integration work.

    February 10th, 2009 @ 04:48 PM

  7. Joshua Vickery
  8. Ryan Daigle
  9. Ryan Daigle
    Ryan Daigle

    (from [c4bd43c74e03150fbd3e361bc62c8432ccaf190f]) [#37 Crash when incoming JSON record has a null DateTime value] add testing of JSON, fix multi-word class name handling http://github.com/yfactorial/obj...

    February 10th, 2009 @ 07:42 PM

  10. jjburka
    jjburka
    • State changed from new to resolved

    February 13th, 2009 @ 08:09 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.