Hi, guys. I'm making a multiplayer game using the NetworkTransport api. The game is currently for android devices and sends unreliable packets 20 times every second. I have use a model of LAN client/server architeture. When I'm playing with only another player (totalizing two players) the game runs fine. But when a third peer connects, most of the times the server player crashes with the following error: F/libc (27722): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x65737341 in tid 28423 (UNET) I/DEBUG ( 249): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 249): Build fingerprint: 'asus/WW_Phone/ASUS_X014D_1:5.1.1/LMY47V/12.2.5.23-20161201:user/release-keys' I/DEBUG ( 249): Revision: '0' I/DEBUG ( 249): ABI: 'arm' I/DEBUG ( 249): pid: 27722, tid: 28423, name: UNET >>> com.TDBrothers.JogoBicnho <<< I/DEBUG ( 249): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x65737341 I/DEBUG ( 249): r0 65737341 r1 00000868 r2 00000868 r3 00000868 I/DEBUG ( 249): r4 b95290d8 r5 b95292c8 r6 9dd4cc08 r7 b985a770 I/DEBUG ( 249): r8 b985f040 r9 b985f040 sl b9861210 fp 00000350 I/DEBUG ( 249): ip 00000000 sp 9dd4cb98 lr a50d7c34 pc a4aed578 cpsr 20010010 I/DEBUG ( 249): I/DEBUG ( 249): backtrace: I/DEBUG ( 249): #00 pc 005ad578 /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN10MemoryPool8AllocateEj+208) I/DEBUG ( 249): #01 pc 00b97c30 /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN4UNET4Host8SendPingEPNS_13NetConnectionE+104) I/DEBUG ( 249): #02 pc 00b9a444 /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN4UNET4Host12HandleTimersEv+244) I/DEBUG ( 249): #03 pc 00ba4038 /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN4UNET7Reactor14DispatchSelectEv+632) I/DEBUG ( 249): #04 pc 00b9e2fc /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN4UNET7Reactor3RunEv+920) I/DEBUG ( 249): #05 pc 00ba3d7c /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN4UNET7Reactor10ThreadFuncEPv+44) I/DEBUG ( 249): #06 pc 00585af0 /data/app/com.TDBrothers.JogoBicnho-2/lib/arm/libunity.so (_ZN6Thread16RunThreadWrapperEPv+84) I/DEBUG ( 249): #07 pc 0001362b /system/lib/libc.so (_ZL15__pthread_startPv+30) I/DEBUG ( 249): #08 pc 00011557 /system/lib/libc.so (__start_thread+6) Can anyone help me? Is this a unity bug?
Seems like the last item in the backtrace, ZN10MemoryPool8AllocateEj, could point to the device running out of memory. Do a lot of allocations happen when adding a new player to the game? Does it happen on more than one device (or on a mac/win/lin standalone player)? If it's a quite consistent crash you could just file a bug report with the project attached and we can try to reproduce it.
Hi, larus. When debugging, I could see nothing special about the memory consumption. When a player is spawned, I instantiate 20 bullets for its character. But the crash when spawning a new player only ocurred sometimes. But the problem seemed to have something to do with the packetSize of the ConnectionConfig I was using. I set it to 5120 bytes. By searching about network configurations that could cause this behavior, I discovered, through the Unity 5.6 documentation, that the maximum recommended packetSize is 1470. Strangely, after fixing this, the crash didn't occur anymore. Even after an hour of playing. I could only test the game with two mobile devices. The crash was only happenning on my Zenfone GO. The problem seems solved.