Crypto crash with SFS server 2.3.13

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

Moderators: Lapo, Bax

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

Crypto crash with SFS server 2.3.13

Postby mmilen » 08 Sep 2018, 19:55

Hi,

Every once in a while I get this crash.

Fatal Exception: NSRangeException
*** -[_NSZeroData subdataWithRange:]: range {0, 16} exceeds data length 0
Raw Text
0
CoreFoundation
__exceptionPreprocess
3
Foundation
-[NSData(NSData) subdataWithRange:]
4 EmaBridge
SFSCryptoInitializer.m line 86
-[SFSCryptoInitializer connection:didReceiveData:]
5 EmaBridge
SFSCryptoInitializer.m line 68
__31-[SFSCryptoInitializer execute]_block_invoke
6
CFNetwork
__75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke
23
libsystem_pthread.dylib
start_wqthread
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 10 Sep 2018, 07:59

Hi,
can you gives the context of this issue?

What API version? What OS (I presume iOS?) What version? Emulator or device?
Is there a way to reproduce the issue? If so which steps should we use?

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

Re: Crypto crash with SFS server 2.3.13

Postby mmilen » 10 Sep 2018, 12:24

iOS 11.4.0, 11.4.1 , 11.2.5 , looks like relate to iOS 11.
iPhone 6, iPhine 7, iPad MIni 2
SFS API Version 1.7.4 [Mar 31st, 2018]
Build with XCode 9.4.1 on 10.13.6
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 10 Sep 2018, 14:22

Is there a way to reproduce the problem?
Thanks
Lapo

--

gotoAndPlay()

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

Re: Crypto crash with SFS server 2.3.13

Postby mmilen » 10 Sep 2018, 16:02

I can't I have 4 iPad iOS with 9, 10 and 11 iOS running 48 hours without any glitch.
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 10 Sep 2018, 16:12

So maybe it could be a temporary hiccup in the client side network...
In any case I would suggest to check the server side logs at the time these issues occur and see if there's anything related.

If you find anything interesting let us know.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Linganna Allula
Posts: 4
Joined: 12 Feb 2021, 10:16

Re: Crypto crash with SFS server 2.3.13

Postby Linganna Allula » 02 Jun 2021, 10:26

Hi Team,

Is there any update on this crash, we are seeing this crash , can you please help on this.


Versions

Devices - iPhone XS(14.3.0 (18C66)), iPhone 11 14.4.1 (18D61)

SFS2XAPIIOS - 1.7.11

SmartFoxServer 2X- 2.16.3


Thanks,
Linganna Allula
mmilen
Posts: 259
Joined: 09 Nov 2010, 00:48
Contact:

Re: Crypto crash with SFS server 2.3.13

Postby mmilen » 02 Jun 2021, 12:33

Currently we are running 2.16.1 on CentOS and have no issues
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 02 Jun 2021, 18:04

Hello,
Linganna Allula wrote:
Is there any update on this crash, we are seeing this crash , can you please help on this.

There is no update because the original poster didn't follow up to our questions. Also this is quite and old post and we don't have reports of specific issues with iOS using SSL.

When you say that you're seeing this crash can you be more specific?
Do you have a stack trace with the details?
Can you reproduce the problem? If so can you give us the details?

Thanks
Lapo

--

gotoAndPlay()

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

Re: Crypto crash with SFS server 2.3.13

Postby mmilen » 02 Jun 2021, 18:15

In our case it was a iOS issue, an update corrected it and we never had to look back.
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 03 Jun 2021, 09:31

mmilen wrote:In our case it was a iOS issue, an update corrected it and we never had to look back.

Thanks for the update.
Lapo

--

gotoAndPlay()

...addicted to flash games
Linganna Allula
Posts: 4
Joined: 12 Feb 2021, 10:16

Re: Crypto crash with SFS server 2.3.13

Postby Linganna Allula » 04 Jun 2021, 09:26

Hi Lapo,

Please find the stack trace below which we are getting


Code: Select all

Fatal Exception: NSRangeException
0  CoreFoundation                 0x1a326586c __exceptionPreprocess
1  libobjc.A.dylib                0x1b81d4c50 objc_exception_throw
2  Foundation                     0x1a44eb6f8 -[NSConcreteFileHandle readDataOfLength:]
3  FitPlus                        0x101990010 -[SFSCryptoInitializer connection:didReceiveData:] + 86 (SFSCryptoInitializer.m:86)
4  FitPlus                        0x10198fec0 __31-[SFSCryptoInitializer execute]_block_invoke + 69 (SFSCryptoInitializer.m:69)
5  FirebasePerformance            0x10385f624 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 300 (FPRNSURLSessionInstrument.m:300)
6  FirebasePerformance            0x10385f624 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 300 (FPRNSURLSessionInstrument.m:300)
7  CFNetwork                      0x1a3882f18 CFNetServiceBrowserSearchForServices
8  CFNetwork                      0x1a3895548 _CFHTTPMessageSetResponseProxyURL
9  libdispatch.dylib              0x1a2e5824c _dispatch_call_block_and_release
10 libdispatch.dylib              0x1a2e59db0 _dispatch_client_callout
11 libdispatch.dylib              0x1a2e6110c _dispatch_lane_serial_drain
12 libdispatch.dylib              0x1a2e61c90 _dispatch_lane_invoke
13 libdispatch.dylib              0x1a2e6bd78 _dispatch_workloop_worker_thread
14 libsystem_pthread.dylib        0x1eea37804 _pthread_wqthread
15 libsystem_pthread.dylib        0x1eea3e75c start_wqthread[code][/code]


Reproduce: Sorry we don't have proper steps to reproduce this, but we are seeing this crash regularly


Please help on this
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 04 Jun 2021, 12:57

Thanks. It seems like a communication problem, but it's not clear what might have caused it. To further investigate we need a way to reproduce the issue.

At this stage it is also not clear how frequent this problem is and if affects only certain types of clients or not. Connection issues are possible especially for mobile devices with a low signal or slow internet connection.
It may be possible that these errors appear only for that category of users, but without more data it's difficult to guess what is going on.

Have you tried reproducing it yourself, maybe using at least 2-3 different mobile devices?

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Linganna Allula
Posts: 4
Joined: 12 Feb 2021, 10:16

Re: Crypto crash with SFS server 2.3.13

Postby Linganna Allula » 21 Jun 2021, 05:10

Hi ,

Thanks for your reply..
We are seeing this crash regularly in different device.. and there is no pattern to reproduce this issue.

As a next step to debug this issue, and to see what's happening.

Can we get a custom iOS library with more logs to find out this issue, and we can use that library and share the logs with you when we got that crash. let me know will that work.
User avatar
Lapo
Site Admin
Posts: 22064
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crypto crash with SFS server 2.3.13

Postby Lapo » 22 Jun 2021, 16:21

Hi,
the logs are already detailed enough to understand what the problem is, generally speaking. It is a network read issue with the initial HTTPS exchange between client and server.

In order to learn more one should inspect the packets exchanged, but because they are encrypted it's impossible to see the data.
This kind of error is definitely unexpected and it's signaling a communication between with client and server. I am under the impression that even if this particular step was done successfully these clients would generate more network errors a bit later with other requests.

Unfortunately we don't have enough data to understand the frequency of this error compared to the volume of traffic you have in your game. I would expect it to be pretty low, around <= 5%. If it were higher then there might be other underlying network issues to investigate.

If you have more data I would recommend to guestimate the frequency.
Also do you have OS version data connected with these errors? Is there any particular OS and/or version that seems to be prevalent?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 3 guests