Search Unity

ARCollaborationData sample cause an exception on iOS 13 beta 3

Discussion in 'AR' started by TobeOrNotTobia, Jul 3, 2019.

  1. TobeOrNotTobia

    TobeOrNotTobia

    Joined:
    Jan 25, 2014
    Posts:
    3
    Hi everyone,
    today we first update our devices to iOS 13 beta 3 and then we tried to build our prototype that uses ARCollaborationData on it.
    The big news is that ARCollaborationData it's broken right now.
    We also tried to build your ARCollaborationExample from this repo and we get the same errors.

    The errors are the following:

    Code (CSharp):
    1. 2019-07-03 13:55:50.007942+0200 samples[1091:164532] -[ARCollaborationData data]: unrecognized selector sent to instance 0x28320b840
    2. 2019-07-03 13:55:50.035188+0200 samples[1091:164532] Uncaught exception: NSInvalidArgumentException: -[ARCollaborationData data]: unrecognized selector sent to instance 0x28320b840
    3. (
    4.     0   CoreFoundation                      0x00000001a0a8a764 CAFC97FE-378F-35C5-9A54-46528DE82A41 + 1226596
    5.     1   libobjc.A.dylib                     0x00000001a07b43a4 objc_exception_throw + 56
    6.     2   CoreFoundation                      0x00000001a098efb4 CAFC97FE-378F-35C5-9A54-46528DE82A41 + 196532
    7.     3   CoreFoundation                      0x00000001a0a8eab0 CAFC97FE-378F-35C5-9A54-46528DE82A41 + 1243824
    8.     4   CoreFoundation                      0x00000001a0a905ec _CF_forwarding_prep_0 + 92
    9.     5   samples                             0x00000001053551d4 UnityARKit_session_getCollaborationDataBytes + 84
    10.     6   samples                             0x00000001055bcce8 ARCollaborationData_get_bytes_m89A172216CF6AA202850469CF919C7DF2F42558B + 88
    11.     7   samples                             0x0000000105367b84 TCPConnection_SendThreadProc_m39BD64F4A6CF9B821A937E6A86A1403C4E4915AC + 520
    12.     8   samples                             0x0000000105762048 ThreadStart_Invoke_m11B6A66E82F02C74399A7314C14C7F52393CC4B4 + 492
    13.     9   samples                             0x000000010574e760 ContextCallback_Invoke_m76E65E7A67AA99858554F451E0F78E22B6478998 + 876
    14.     10  samples                             0x000000010574f5c8 ExecutionContext_RunInternal_m5BF955CE8B04D9A7C959B9011579CC0FABD5FC56 + 348
    15.     11  samples                             0x0000000105762048 ThreadStart_Invoke_m11B6A66E82F02C74399A7314C14C7F52393CC4B4 + 492
    16.     12  samples                             0x00000001048ebf48 _Z65RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4_ + 20
    17.     13  samples                             0x0000000105313584 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 116
    18.     14  samples                             0x00000001052e19a0 _ZN6il2cpp6icalls8mscorlib6System9ThreadingL11ThreadStartEPv + 108
    19.     15  samples                             0x00000001052ea3c0 _ZN6il2cpp2os6Thread10RunWrapperEPv + 88
    20.     16  samples                             0x00000001052ec660 _ZN6il2cpp2os10ThreadImpl18ThreadStartWrapperEPv + 36
    21.     17  libsystem_pthread.dylib             0x00000001a07a8164 _pthread_start + 128
    22.     18  libsystem_pthread.dylib             0x00000001a07abaac thread_start + 8
    23. )
    24. 2019-07-03 13:55:50.035670+0200 samples[1091:164532] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ARCollaborationData data]: unrecognized selector sent to instance 0x28320b840'
    25. *** First throw call stack:
    26. (0x1a0a8a750 0x1a07b43a4 0x1a098efb4 0x1a0a8eab0 0x1a0a905ec 0x1053551d4 0x1055bcce8 0x105367b84 0x105762048 0x10574e760 0x10574f5c8 0x105762048 0x1048ebf48 0x105313584 0x1052e19a0 0x1052ea3c0 0x1052ec660 0x1a07a8164 0x1a07abaac)
    27. libc++abi.dylib: terminating with uncaught exception of type NSException
    28. (lldb)
    We've discovered that issue happens when the code tries to obtain the bytes array from collaborationData at line 157 of TCPConnection.cs

    Code (CSharp):
    1. SendData(stream, collaborationData.bytes);
    2.  
    I know it's a really new bug, but could you give us a solution to this bug.
     
  2. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    Hi,

    Yes, we have the same problem too.