2013-12-21 61 views
0

有人可以給我一個提示,爲什麼我總是在從XBMC調用jsonrpc接口時出現一個「DSJSONRPC doesNotRecognizeSelector」 ?爲什麼在XBMC上調用JSONRPC時出現未知選擇器?

結果在控制檯:

*** JSON-RPC REQUEST: 
{ 
    id = 654509193; 
    jsonrpc = "2.0"; 
    method = "Player.GetActivePlayers"; 
    params =  { 
    }; 
} 

代碼:

DSJSONRPC *jsonRPC = [[DSJSONRPC alloc] initWithServiceEndpoint:[NSURL URLWithString:@"http://192.168.1.101:8080/jsonrpc"]]; 

    [jsonRPC callMethod:@"Player.GetActivePlayers" withParameters:@{ } 
       onCompletion:^(NSString *methodName, NSInteger callId, id methodResult, DSJSONRPCError *methodError, NSError* internalError) 

使用DSJSONRPC從Demiurgic JSON RPC

找不到錯誤 - 在XBMC電影播放在這個時候.. 。

在此先感謝, cheese

這裏的錯誤堆棧:

2013-12-22 22:02:52.846 XBMCapp[3529:70b] *** JSON-RPC REQUEST: 
{ 
    id = "-1698136466"; 
    jsonrpc = "2.0"; 
    method = "Player.GetActivePlayers"; 
    params =  { 
    }; 
} 
2013-12-22 22:02:52.847 XBMCapp[3529:70b] Error:<DSJSONRPC: 0x95c11b0> 
2013-12-22 22:02:52.847 XBMCapp[3529:70b] -[DSJSONRPC localizedDescription]: unrecognized selector sent to instance 0x95c11b0 
2013-12-22 22:02:52.873 XBMCapp[3529:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DSJSONRPC localizedDescription]: unrecognized selector sent to instance 0x95c11b0' 
*** First throw call stack: 
(
    0 CoreFoundation      0x01ef25e4 __exceptionPreprocess + 180 
    1 libobjc.A.dylib      0x018058b6 objc_exception_throw + 44 
    2 CoreFoundation      0x01f8f903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 
    3 CoreFoundation      0x01ee290b ___forwarding___ + 1019 
    4 CoreFoundation      0x01ee24ee _CF_forwarding_prep_0 + 14 
    5 XBMCapp       0x000109ab -[DSJSONRPC callMethod:withParameters:onCompletion:] + 477 
    6 XBMCapp       0x000054df -[RootViewController nowplayingAction:] + 298 
    7 libobjc.A.dylib      0x01817874 -[NSObject performSelector:withObject:withObject:] + 77 
    8 UIKit        0x004780c2 -[UIApplication sendAction:to:from:forEvent:] + 108 
    9 UIKit        0x0074cc9b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139 
    10 libobjc.A.dylib      0x01817874 -[NSObject performSelector:withObject:withObject:] + 77 
    11 UIKit        0x004780c2 -[UIApplication sendAction:to:from:forEvent:] + 108 
    12 UIKit        0x0047804e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61 
    13 UIKit        0x005700c1 -[UIControl sendAction:to:forEvent:] + 66 
    14 UIKit        0x00570484 -[UIControl _sendActionsForEvents:withEvent:] + 577 
    15 UIKit        0x0056f733 -[UIControl touchesEnded:withEvent:] + 641 
    16 UIKit        0x004b551d -[UIWindow _sendTouchesForEvent:] + 852 
    17 UIKit        0x004b6184 -[UIWindow sendEvent:] + 1232 
    18 UIKit        0x00489e86 -[UIApplication sendEvent:] + 242 
    19 UIKit        0x0047418f _UIApplicationHandleEventQueue + 11421 
    20 CoreFoundation      0x01e7b83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 
    21 CoreFoundation      0x01e7b1cb __CFRunLoopDoSources0 + 235 
    22 CoreFoundation      0x01e9829e __CFRunLoopRun + 910 
    23 CoreFoundation      0x01e97ac3 CFRunLoopRunSpecific + 467 
    24 CoreFoundation      0x01e978db CFRunLoopRunInMode + 123 
    25 GraphicsServices     0x02d889e2 GSEventRunModal + 192 
    26 GraphicsServices     0x02d88809 GSEventRun + 104 
    27 UIKit        0x00476d3b UIApplicationMain + 1225 
    28 XBMCapp       0x0000234b main + 93 
    29 libdyld.dylib      0x02a2a70d start + 1 
    30 ???         0x00000001 0x0 + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
+1

您應該發佈*完整*錯誤消息。 –

+0

而這與Xcode無關。 – 2013-12-21 21:22:25

+1

發佈了整個錯誤堆棧 – cheese

回答

0

OK,發現了問題 - 也許我有一個老版本的JSON類的...... 有一個未初始化錯誤變量... 將其更改爲無那麼一切就像一個魅力。

謝謝:)

相關問題