Crash after DisconnectEvent
Hi there,
I have two Gear VR Devices and a server.
There's three connections between the two devices (2 QosType.StateUpdate connections, 1 QosType.UnreliableSequenced), and a connection between the server and the devices (that doesn't use Unity Network Library).
Host and Clients are chosen from those who joins the room first.
Everything usually work great, but when I disconnect, I have a chance to have a SIGSEGV. When we have 4 devices, we have a great chance to have 1 device that crashes.
After the second NetworkEventType.DisconnectEvent, on one of the devices, I had this :
E/Watchdog(3637): !@Sync 259 [01-04 14:11:33.458]
I/Unity(5388): Disconnect event (id = 2, hostId = 1)
I/Unity(5388):
I/Unity(5388): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity(5388): Disconnect event (id = 2, hostId = 0)
I/Unity(5388):
I/Unity(5388): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
A/libc(5388): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8c in tid 5779 (UNET)
I/DEBUG(2982): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG(2982): Build fingerprint: 'samsung/zerofltexx/zeroflte:5.1.1/LMY47X/G920FXXU3QOJL:user/release-keys'
I/DEBUG(2982): Revision: '11'
I/DEBUG(2982): ABI: 'arm'
I/DEBUG(2982): pid: 5388, tid: 5779, name: UNET >>> com.the.bundleid <<<
I/DEBUG(2982): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8c
I/DEBUG(2982): r0 0000008c r1 d1004826 r2 00000000 r3 00000004
I/DEBUG(2982): r4 d51ee2e0 r5 d11f90a0 r6 f485ec30 r7 00000000
I/DEBUG(2982): r8 da7f1df0 r9 000002d0 sl d11f90a0 fp df70c4e8
I/DEBUG(2982): ip 80000000 sp d1a70ba8 lr e159026c pc e158fdf0 cpsr 60010010
I/DEBUG(2982): backtrace:
I/DEBUG(2982): #00 pc 0077edf0 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #01 pc 0077f6b0 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #02 pc 0077f870 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #03 pc 00787990 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #04 pc 00783938 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #05 pc 007876c0 /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #06 pc 00433acc /data/app/com.the.bundleid-2/lib/arm/libunity.so
I/DEBUG(2982): #07 pc 000174e7 /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG(2982): #08 pc 00015503 /system/lib/libc.so (__start_thread+6)
It can come randomly but crashes the application. Have you had this issue previously? Any idea how to solve it? (I think it's a bug from Unity's motor, but maybe there's a way to prevent the causes from happening)
Thank you, Sylafrs.
Edit notes : Crashes also on Editor. No need for tricky connections or disconnection cases.
Editor Log : http://pastebin.com/j9H2Syrn (only the end matters)
I will try 5.3.1p3 "(729157) - Networking: Prevent [Command] functions from accepting NetworkConnection objects as parameters, which causes a UNetWeaver error." Maybe that was it. Edit: Still crashes
I noticed a 'leak' when clients connects/disconnects a lot in a row. Logs "val > 0", "val >= 0", "m_AllocCount != 0" pops in that case. Calling Shutdown and reload everything can calm things down, thought.
Hello there. I am having exacting the same problem. Did you finally solved it by shutting down the NetworkTransport?
If I remember it 'calms' the memory issue. When you have multiples connections you can't just shutdown everything, so when we have a 3-4 connected devices, the issue reappears :/
Haven't tried the last Unity version. Haven't tested the project since January (have other projects)
Your answer
Follow this Question
Related Questions
Unity Photon Player Instantiation 1 Answer
Two different games, connecting to the same server session, is it possible? 0 Answers
SteamVR/Pun Networking integration 0 Answers
Models used for Hand Presence in UnityXR pop out of existence when close to the camera 0 Answers
How to represent hand prefab with SteamVR using Photon (unity)? 2 Answers