TransferOwnership crashes on standalone OSX only

Options
Hello, exactly as title says: in OSX and Windows editor everything goes fine, same for Windows standalone. But on OSX standalone the game always has a fatal crash after calling TransferOwnership. We are building our game with PUN 1.88, sticking with .NET 3.5, tried both in Unity 2017.0.3p1 and 2017.3.1p4.
This is the most I managed to get from logs:

System log
Thread 0 Crashed:: MainThrd Dispatch queue: com.apple.main-thread

0 ??? 0x00000001368c91ba 0 + 5210149306
1 ??? 0x00000001564188de 0 + 5742102750
2 ??? 0x0000000156418dbf 0 + 5742103999
3 libmono.0.dylib 0x000000011950a0c6 0x119500000 + 41158
4 libmono.0.dylib 0x0000000119636a06 mono_runtime_invoke + 117
5 libmono.0.dylib 0x000000011963c7ac mono_runtime_invoke_array + 946
6 libmono.0.dylib 0x00000001195fb0e7 0x119500000 + 1028327
7 ??? 0x0000000122d2e2d9 0 + 4879213273
8 ??? 0x000000012824789e 0 + 4968446110

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000001 rcx: 0x00007ffeefbfb820 rdx: 0x000000010416bed8
rdi: 0x0000000000000000 rsi: 0x000000010414e878 rbp: 0x00007ffeefbfb1d0 rsp: 0x00007ffeefbfb160
r8: 0x00000001197afe58 r9: 0x000000000002dcad r10: 0x0000000104775b40 r11: 0x0000000102612d30
r12: 0x00000001515e7c08 r13: 0x000000010419b078 r14: 0x00000001518e0d20 r15: 0x00000001518e0d20
rip: 0x00000001368c91ba rfl: 0x0000000000000202 cr2: 0x0000000180fda3c4

Logical CPU: 0
Error Code: 0x020000b8
Trap Number: 133

Player log (last thing before crashing)
TransferOwnership() view 100 to: 1 Time: 796
0 StayinAlive 0x00000001009ce065 _Z13GetStacktracei + 85
1 StayinAlive 0x0000000100780447 _Z17DebugStringToFileRK21DebugStringToFileData + 391
2 StayinAlive 0x000000010077f7a1 _Z17DebugStringToFilePKciS0_i15LogMessageFlagsiiPFvRK11CppLogEntryE + 97
3 StayinAlive 0x00000001009d852b _Z35DebugLogHandler_CUSTOM_Internal_Log7LogTypeP10MonoStringP10MonoObject + 187
4 [Mono JITed code] (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object) {0x10434cea8} + 0x6c (0x150288e60 0x150288f50) [0x1183dbc80 - Unity Root Domain]
5 [Mono JITed code] (wrapper runtime-invoke) :runtime_invoke_void__this___object_PhotonMessageInfo (object,intptr,intptr,intptr) {0x102f9e8a8} + 0x138 (0x15f704810 0x15f704983) [0x1183dbc80 - Unity Root Domain]
6 libmonobdwgc-2.0.dylib 0x0000000117f0ea1c mono_jit_runtime_invoke + 2458
7 libmonobdwgc-2.0.dylib 0x00000001180d18f5 do_runtime_invoke + 88
8 libmonobdwgc-2.0.dylib 0x00000001180d49a7 mono_runtime_try_invoke_array + 1210
9 libmonobdwgc-2.0.dylib 0x00000001180484b5 ves_icall_InternalInvoke + 654
10 [Mono JITed code] (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) {0x104b5c918} + 0x74 (0x1501f24a0 0x1501f25c3) [0x1183dbc80 - Unity Root Domain]
11 [Mono JITed code] System.Reflection.MethodBase:Invoke (object,object[]) {0x113801700} + 0x2b (0x150846a00 0x150846a34) [0x1183dbc80 - Unity Root Domain]

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Comments

  • jeanfabre
    Options
    Hi,

    I confirm that everything works fine here. Can you try with the demo provided by Photon? there is a Transfert ownership demo dedicated to test this.

    Bye,

    Jean
  • Danjel
    Options
    We just finished a more in-depth inspection of the code and the resulting error was due to a legit try/catch block that we had few lines after that TransferOwnership. I guess it's some kind of difference with the OSX compiler, will report this to Unity. Sorry for bothering!
  • jeanfabre
    Options
    Hi,

    no worries :) it's always better to ask around when you have an issue than try to solve it on your own.

    Bye,

    Jean