-[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

mmilen
Posts: 236
Joined: 09 Nov 2010, 00:48
Contact:

-[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby mmilen » 08 May 2020, 10:12

Hi Guys,

Every once in a while I get this in my game's crash logs. Any idea what might be causing it?

Fatal Exception: NSRangeException
*** -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

CoreFoundation __exceptionPreprocess
Foundation -[NSConcreteFileHandle readDataOfLength:]

EmaBridge SFSCryptoInitializer.m - Line 86
-[SFSCryptoInitializer connection:didReceiveData:] + 86

EmaBridge SFSCryptoInitializer.m - Line 68
__31-[SFSCryptoInitializer execute]_block_invoke + 68

CFNetwork CFNetServiceBrowserSearchForServices
libsystem_pthread.dylib
start_wqthread
User avatar
Lapo
Site Admin
Posts: 21443
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby Lapo » 08 May 2020, 11:11

Hi,
it sounds like a bad cryptography exchange.
The client is expecting two blocks of 16 bytes each, but it looks like the data is not there.

It's difficult to say what might be the cause of this, honestly. It may be some sort of network error.
Is there a correspondent server-side error that might provide more details? (Something related with cryptography)

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
mmilen
Posts: 236
Joined: 09 Nov 2010, 00:48
Contact:

Re: -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby mmilen » 08 May 2020, 12:28

I will check and let you know.
mmilen
Posts: 236
Joined: 09 Nov 2010, 00:48
Contact:

Re: -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby mmilen » 12 May 2020, 15:51

Nothing in the log with regards to an error. The usual message shortly after the crash of the client, that the user is disconnected.
User avatar
Lapo
Site Admin
Posts: 21443
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby Lapo » 13 May 2020, 07:24

Have you also checked the web server logs? Since this appears to be an encryption init issue the error might have been logged as an HTTP code.

Let us know
Lapo

--

gotoAndPlay()

...addicted to flash games
mmilen
Posts: 236
Joined: 09 Nov 2010, 00:48
Contact:

Re: -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0

Postby mmilen » 14 May 2020, 11:36

Here is an other one that is hoping every once in a while iOS latest API, server ver 2.15

Fatal Exception: NSInvalidArgumentException
*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: room)
-[ExtensionController handleMessage:]
keyboard_arrow_down

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x196aaf5f0 __exceptionPreprocess
1 libobjc.A.dylib 0x1967d1bcc objc_exception_throw
2 CoreFoundation 0x196b050cc -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x196b0e710 -[__NSDictionaryM setObject:forKey:].cold.3
4 CoreFoundation 0x19698bf88 -[__NSDictionaryM setObject:forKey:]
5 EmaBridge 0x1024c1554 -[ExtensionController handleMessage:] + 51 (ExtensionController.m:51)
6 EmaBridge 0x1024e5090 -[SFSProtocolCodec dispatchRequest:] + 65 (SFSProtocolCodec.m:65)
7 EmaBridge 0x1024e52ac -[SFSProtocolCodec onPacketRead:] + 90 (SFSProtocolCodec.m:90)
8 EmaBridge 0x1024de1fc -[SFSIOHandler handlePacketData:] + 94 (SFSIOHandler.m:94)
9 EmaBridge 0x1024df528 -[SFSIOHandler onDataRead:] + 244 (SFSIOHandler.m:244)
10 EmaBridge 0x1024ae1ac -[BitSwarmClient stream:handleEvent:] + 465 (BitSwarmClient.m:465)
11 CoreFoundation 0x196a46170 _signalEventSync
12 CoreFoundation 0x196a4314c _cfstream_solo_signalEventSync
13 CoreFoundation 0x196a42f04 _CFStreamSignalEvent
14 CFNetwork 0x199dd8fa4 _CFStreamErrorFromCFError
15 CFNetwork 0x199ddfb00 _CFStreamErrorFromCFError
16 CoreFoundation 0x196a39a48 __CFSocketPerformV0
17 CoreFoundation 0x196a2db64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
18 CoreFoundation 0x196a2dabc __CFRunLoopDoSource0
19 CoreFoundation 0x196a2d244 __CFRunLoopDoSources0
20 CoreFoundation 0x196a28274 __CFRunLoopRun
21 CoreFoundation 0x196a27c34 CFRunLoopRunSpecific
22 GraphicsServices 0x1a0b7138c GSEventRunModal
23 UIKitCore 0x19ab5a22c UIApplicationMain
24 EmaBridge 0x10236ebd0 main + 16 (main.m:16)
25 libdyld.dylib 0x1968af800 start

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 5 guests