Crash Signal 11

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Elias
Posts: 2
Joined: 23 Sep 2021, 13:33

Crash Signal 11

Postby Elias » 23 Sep 2021, 14:11

1. SmartFoxServer 2X v2.17.3
2. Unity 2019.2.21f1
3. Android 4-11
4. Anyone device with android
5. Network - wifi 100Mbps
6. Any additional custom JVM settings used at runtime - no
7. Description issue:
The client connects to the server, enters the room, and after a while crashes. The amount of time from connection to crash is different with each new attempt.

Probably, this happens at the moment of receiving the next packet about the position of another player. If the client is alone in the room, no crash occurs.

Based on research, if you reduce the number of packets with a position to 3-5 per second, a crash does not occur (or does not occur for a sufficiently long period).

The crash doesn't happen when the client app runs in Unity Editor on PC. It occurs only on mobile devices on Android if the application is compiled in il2cpp (in the application compiled in mono, the crash does not happen). We did not build the application for IOS.

8. SFS configuration - in attachments

Some crashes (backtrace always empty):
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0003000000000126
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: Build fingerprint: 'realme/RMX3085RU/RMX3085L1:11/RP1A.200720.011/1626248114220:user/release-keys'
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: Revision: '0'
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: pid: 4085, tid: 4344, name: UnityMain >>> app.package.name <<<
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x0 0000000000000001 x1 0000006f48886a00 x2 0000006ec02ca820 x3 ffffffff9ec36802
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x4 0021e4f70c000000 x5 0000006fcecfc0e8 x6 00000070d5621000 x7 00000000110b9fc8
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x8 0003000000000000 x9 0000006ec020dcc0 x10 0000000000000020 x11 0000006f8be18ea8
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x12 0000006f48886a00 x13 00000000614ad965 x14 0003259efe2570e4 x15 0000639eb44ede6d
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x16 0000006f975c5980 x17 00000070ce99b990 x18 0000000000000031 x19 0000006ec020dcc0
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x20 0000006f8118d370 x21 0000006f811c6f08 x22 0000000080000000 x23 0000006fc5211bc0
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x24 0000006fc5211c00 x25 000000007fffffff x26 0000000000005001 x27 0000000000000002
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: x28 0000006f931fae90 x29 0000006f931fa6e0 x30 0000006f7f4b08d8
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: sp 0000006f931fa680 pc 0000006f7f4b08ec pstate 0000000080001000
2021-09-22 11:21:09.061 4085-4344/app.package.name E/CRASH: backtrace:

2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000020
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: Build fingerprint: 'realme/RMX3085RU/RMX3085L1:11/RP1A.200720.011/1626248114220:user/release-keys'
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: Revision: '0'
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: pid: 31679, tid: 31902, name: UnityMain >>> app.package.name <<<
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x0 0000000000000020 x1 0000000000000000 x2 0000006f2f9c6ab8 x3 0000006f91ee8940
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x4 0000000000000000 x5 0000006f91ee7f80 x6 0000000000000001 x7 bdd44ed03f79cea2
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x8 0000000000000020 x9 0000000000000000 x10 0000000000000000 x11 0000000000000001
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x12 00000000b80c5908 x13 00000000b80c5908 x14 0000000000038fa6 x15 0000006f959a5000
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x16 0000006f96004db0 x17 00000070ce934940 x18 0000006f91ee8718 x19 0000006f91ee8a10
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x20 0000000000000000 x21 0000006f46168300 x22 0000006f91ee88e0 x23 0000000000000000
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x24 0000000000000000 x25 0000000000000000 x26 000000007071dd58 x27 0000000000000000
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: x28 0000000000000001 x29 0000006f91ee8620 x30 0000006f795da1d0
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: sp 0000006f91ee85d0 pc 0000006f78bfea48 pstate 0000000080001000
2021-09-22 17:29:07.148 31679-31902/app.package.name E/CRASH: backtrace:
Attachments
config.zip
(102.27 KiB) Downloaded 466 times
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crash Signal 11

Postby Lapo » 23 Sep 2021, 14:44

Hi,
thanks for the detailed report.
It pains me to say, as it sometimes happens with Unity, that this is one of those cases where it's really hard for us to help because the problem is buried down deep in the way Unity compiles the original C# bytecode to Android. That's kind of a black box, unfortunately. :(

From the stack traces it's not even clear that it's an issue with the SFS2X API, as I can't see any references to anything SFS2X related.

Is the stack trace actually complete?
If the Mono compilation works without issues (which should always be the case), can't you use that instead?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
elestrago
Posts: 2
Joined: 02 Oct 2021, 13:07

Re: Crash Signal 11

Postby elestrago » 04 Oct 2021, 15:00

Lapo wrote:Hi,
thanks for the detailed report.
It pains me to say, as it sometimes happens with Unity, that this is one of those cases where it's really hard for us to help because the problem is buried down deep in the way Unity compiles the original C# bytecode to Android. That's kind of a black box, unfortunately. :(

From the stack traces it's not even clear that it's an issue with the SFS2X API, as I can't see any references to anything SFS2X related.

Is the stack trace actually complete?
If the Mono compilation works without issues (which should always be the case), can't you use that instead?

Thanks


Hi, we found what was the reason for this error. In the client API for Unity, the

Code: Select all

Console.WriteLine()
method was used to display logs, which is an error, since in Unity, you must use https://docs.unity3d.com/ScriptReference/Debug.html

Code: Select all

UnityEngine.Debug.Log()

to display logs.

After we decompiled the library and removed this line from it, the application no longer crashed.

This crash occure when assembling a build on the Android platform with il2spp and very frequent output of logs through the class.

Code: Select all

Sfs2X.Logging.Logger.Log()

The error manifested itself with frequent sending and receiving of messages, as an example we found this when the character rotation was synchronized.

Please check this case, as this can be a real problem when using the Unity plugin.

Thanks.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Crash Signal 11

Postby Bax » 05 Oct 2021, 15:13

Thank you for reporting. We will fix this in the next API release.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Crash Signal 11

Postby Bax » 06 Oct 2021, 13:26

We just published a new version of the C# API containing the fix. Now under Unity that Console.WriteLine is substituted by a Debug.Log.
Again, thank you for reporting the issue.
Paolo Bax
The SmartFoxServer Team
elestrago
Posts: 2
Joined: 02 Oct 2021, 13:07

Re: Crash Signal 11

Postby elestrago » 17 Oct 2021, 07:57

Bax wrote:We just published a new version of the C# API containing the fix. Now under Unity that Console.WriteLine is substituted by a Debug.Log.
Again, thank you for reporting the issue.


Thanks for release new version with fix.
We try new version so fast as possible and write feedback.
Elias
Posts: 2
Joined: 23 Sep 2021, 13:33

Re: Crash Signal 11

Postby Elias » 19 Oct 2021, 06:12

Thanks for 1.7.16
After updating dll, the crash with signal 11 could not be reproduced.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 36 guests