The code below throws NSInvalidArgumentException.
Here is the stack trace.
2014-04-20 16:50:27.991 hattoo[92199:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
*** First throw call stack:
(
0 CoreFoundation 0x02f581e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0260a8e5 objc_exception_throw + 44
2 CoreFoundation 0x02f57fbb +[NSException raise:format:] + 139
3 Foundation 0x01ecfbd2 +[NSJSONSerialization JSONObjectWithData:options:error:] + 67
4 hattoo 0x001ae53a +[LiveRoomInfoEvent buildLiveRoomInfoEvent:] + 430
5 hattoo 0x001ab63b -[WarpClient handleLockRoomPropertiesResponse:] + 46
6 hattoo 0x001a67fe -[WarpClient onResponse:] + 462
7 hattoo 0x001a0454 -[ClientChannel stream:handleEvent:] + 1781
8 CoreFoundation 0x02fb84bb _inputStreamCallbackFunc + 75
9 CoreFoundation 0x02f1f266 _signalEventSync + 150
10 CoreFoundation 0x02f1f19e _cfstream_solo_signalEventSync + 222
11 CoreFoundation 0x02f1eead _CFStreamSignalEvent + 429
12 CoreFoundation 0x02f1ecf7 CFReadStreamSignalEvent + 39
13 CFNetwork 0x03818225 _ZN29CoreReadStreamCFStreamSupport19coreStreamReadEventEP16__CoreReadStreamm + 101
14 CFNetwork 0x0390b516 _ZThn12_N29CoreReadStreamCFStreamSupport19coreStreamReadEventEP16__CoreReadStreamm + 34
15 CFNetwork 0x038181ab _ZN20CoreReadStreamClient25coreStreamEventsAvailableEm + 51
16 CFNetwork 0x0390d0df _ZN14CoreStreamBase14_callClientNowEP16CoreStreamClient + 49
17 CFNetwork 0x03817f59 _ZN14CoreStreamBase34_streamSetEventAndScheduleDeliveryEmh + 167
18 CFNetwork 0x03817ea9 _ZN14CoreStreamBase12_signalEventEm13CFStreamErrorh + 137
19 CFNetwork 0x03817e18 _ZN14CoreStreamBase28_streamInterface_SignalEventEmPK13CFStreamError + 70
20 CFNetwork 0x03817d8a _ZN12SocketStream40dispatchSignalFromSocketCallbackUnlockedEP24SocketStreamSignalHolder + 76
21 CFNetwork 0x03817686 _ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 216
22 CFNetwork 0x03817582 _ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 74
23 CoreFoundation 0x02f180da __CFSocketPerformV0 + 714
24 CoreFoundation 0x02ee177f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
25 CoreFoundation 0x02ee110b __CFRunLoopDoSources0 + 235
26 CoreFoundation 0x02efe1ae __CFRunLoopRun + 910
27 CoreFoundation 0x02efd9d3 CFRunLoopRunSpecific + 467
28 CoreFoundation 0x02efd7eb CFRunLoopRunInMode + 123
29 GraphicsServices 0x03ccd5ee GSEventRunModal + 192
30 GraphicsServices 0x03ccd42b GSEventRun + 104
31 UIKit 0x0064ef9b UIApplicationMain + 1225
32 hattoo 0x000c9cfc main + 92
33 libdyld.dylib 0x02afd701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException