Sphero-iOS-SDK icon indicating copy to clipboard operation
Sphero-iOS-SDK copied to clipboard

RKResponseFactory is throwing an exception which is causing my app to crash

Open michaeldeitcher opened this issue 8 years ago • 2 comments

This is happening on a separate thread from my call to robot.send with a roll command. Is happens infrequently and I'm not sure why. How do I keep it from crashing my app? Please help.

I am calling robot.send with the roll command about 30 times a second. My application uses alternative device to control the sphero. Should I be calling it less frequently?

[RKResponseFactory responseFromRawPacket:withCommand:] - Bad Command ~ firmware mismatch? ( 4 ) for command <RKGetSkuCommand 0x02:0x3A : seq=0x05> - seq:0x05 2016-10-03 13:42:18.221077 Colorbot-iOS[667:125002] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM insertObject:atIndex:]: index 17 beyond bounds [0 .. 15]' *** First throw call stack: (0x18fcf81c0 0x18e73055c 0x18fbd7ad4 0x10016ab08 0x100176200 0x100175fb8 0x100132c08 0x100c6525c 0x100c6521c 0x100c72b54 0x100c68ce4 0x100c730f0 0x100c74e6c 0x100c74bb8 0x18ed892c8 0x18ed88db4) libc++abi.dylib: terminating with uncaught exception of type NSException

Stacktrace

michaeldeitcher avatar Oct 03 '16 20:10 michaeldeitcher

I've reduced my number of calls from 30 a second to 10 a second. It seems to be helping.

michaeldeitcher avatar Oct 04 '16 22:10 michaeldeitcher

Hey michaeldeitcher, I'd love to look into this for you, but I'll need to know your SDK checkout first so I'm looking in the right spot.

zenelk avatar Oct 05 '16 20:10 zenelk