Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug 2021.2.8f1 Build fails with IL2CPP

Discussion in 'Editor & General Support' started by Stefan-Jandl, Jan 17, 2022.

  1. Stefan-Jandl

    Stefan-Jandl

    Joined:
    Jan 17, 2022
    Posts:
    6
    Hello,
    I'm working on a library package and running into an issue when trying to build a project with it.
    • The default target API compatibility level in 2021.2.8f1 seems to be .NET Standard 2.1
    • I'm building our package solution with .NET Standard 2.1 and then embedding the package in a new Unity project
    • When building the project with IL2CPP the build fails
    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4g2s2/lhur_ntry.Unity.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:15537:9: error: no matching function for call to 'JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553'
    L_5 = JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553(L_3, L_4, NULL);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:4898:92: note: candidate function not viable: no known conversion from 'ReadOnlyMemory_1_t63F301BF893B0AB689953D86A641168CA66D2399' to 'ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE' for 1st argument
    IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR JsonDocument_tF96A1F7D1D40932B5EA6A97DA06E150B6CBDBE6F* JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553 (ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE ___utf8Json0, JsonDocumentOptions_t46D96C339522F4321E0FA1BD1DB3ABE2F300299B ___options1, const RuntimeMethod* method) ;
    ^
    1 error generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4t7v3/lhur_ntry.Unity.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:15537:9: error: no matching function for call to 'JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553'
    L_5 = JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553(L_3, L_4, NULL);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:4898:92: note: candidate function not viable: no known conversion from 'ReadOnlyMemory_1_t63F301BF893B0AB689953D86A641168CA66D2399' to 'ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE' for 1st argument
    IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR JsonDocument_tF96A1F7D1D40932B5EA6A97DA06E150B6CBDBE6F* JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553 (ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE ___utf8Json0, JsonDocumentOptions_t46D96C339522F4321E0FA1BD1DB3ABE2F300299B ___options1, const RuntimeMethod* method) ;
    ^
    In file included from /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:1:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/pch/pch-cpp.hpp:6:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen.h:10:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-il2cpp.h:3:
    /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-common-small.h:34:20: warning: implicit conversion from 'long long' to 'int' changes value from -9223372036854775808 to 0 [-Wconstant-conversion]
    return INT64_MIN;
    ~~~~~~ ^~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/stdint.h:105:37: note: expanded from macro 'INT64_MIN'
    #define INT64_MIN (-INT64_MAX-1)
    ~~~~~~~~~~^~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:9078:119: note: in instantiation of function template specialization 'il2cpp_codegen_cast_double_to_int<int>' requested here
    ScriptableSentryUnityOptions_set_AutoSessionTrackingInterval_m363E26DC4DAA8E00BF68F1BDEB2DA68CBF6C5B84_inline(L_13, il2cpp_codegen_cast_double_to_int<int32_t>(L_16), NULL);
    ^
    In file included from /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:1:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/pch/pch-cpp.hpp:6:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen.h:10:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-il2cpp.h:3:
    /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-common-small.h:34:20: warning: implicit conversion from 'long long' to 'short' changes value from -9223372036854775808 to 0 [-Wconstant-conversion]
    return INT64_MIN;
    ~~~~~~ ^~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/stdint.h:105:37: note: expanded from macro 'INT64_MIN'
    #define INT64_MIN (-INT64_MAX-1)
    ~~~~~~~~~~^~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:12351:71: note: in instantiation of function template specialization 'il2cpp_codegen_cast_double_to_int<short>' requested here
    Nullable_1__ctor_m6B3338D34F1A4931563055D7BB98584876E59C1B((&L_64), il2cpp_codegen_cast_double_to_int<int16_t>(((float)il2cpp_codegen_multiply(L_63, (100.0f)))), /*hidden argument*/Nullable_1__ctor_m6B3338D34F1A4931563055D7BB98584876E59C1B_RuntimeMethod_var);
    ^
    In file included from /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry.Unity.cpp:1:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/pch/pch-cpp.hpp:6:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen.h:10:
    In file included from /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-il2cpp.h:3:
    /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/il2cpp/libil2cpp/codegen/il2cpp-codegen-common-small.h:36:20: warning: implicit conversion from 'int' to 'short' changes value from -2147483648 to 0 [-Wconstant-conversion]
    return INT32_MIN;
    ~~~~~~ ^~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/stdint.h:104:37: note: expanded from macro 'INT32_MIN'
    #define INT32_MIN (-INT32_MAX-1)
    ~~~~~~~~~~^~
    3 warnings and 1 error generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4g2s2/ghfw_Text.Json3.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:16988:242: error: no viable conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D'
    L_4 = VirtualFuncInvoker1< int32_t, ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D >::Invoke(9 /* System.Int32 System.Text.Encodings.Web.TextEncoder::FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan`1<System.Byte>) */, G_B2_0, L_3);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'const ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &&' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:63:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:17080:383: error: no viable conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D'
    L_3 = VirtualFuncInvoker5< int32_t, ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D, Span_1_tDADAC65069DFE6B57C458109115ECD795ED39305, int32_t*, int32_t*, bool >::Invoke(7 /* System.Buffers.OperationStatus System.Text.Encodings.Web.TextEncoder::EncodeUtf8(System.ReadOnlySpan`1<System.Byte>,System.Span`1<System.Byte>,System.Int32&,System.Int32&,System.Boolean) */, L_0, L_1, L_2, (&V_1), (&V_2), (bool)1);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'const ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &&' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:107:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:17530:379: error: no viable conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1'
    L_3 = VirtualFuncInvoker5< int32_t, ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1, Span_1_tEDDF15FCF9EC6DEBA0F696BAACDDBAB9D92C252D, int32_t*, int32_t*, bool >::Invoke(8 /* System.Buffers.OperationStatus System.Text.Encodings.Web.TextEncoder::Encode(System.ReadOnlySpan`1<System.Char>,System.Span`1<System.Char>,System.Int32&,System.Int32&,System.Boolean) */, L_0, L_1, L_2, (&V_1), (&V_2), (bool)1);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3929:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'const ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1 &' for 1st argument
    struct ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3929:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1 &&' for 1st argument
    struct ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:107:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    ^
    3 errors generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4t7v3/ghfw_Text.Json3.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:16988:242: error: no viable conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D'
    L_4 = VirtualFuncInvoker1< int32_t, ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D >::Invoke(9 /* System.Int32 System.Text.Encodings.Web.TextEncoder::FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan`1<System.Byte>) */, G_B2_0, L_3);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'const ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &&' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:63:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:17080:383: error: no viable conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D'
    L_3 = VirtualFuncInvoker5< int32_t, ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D, Span_1_tDADAC65069DFE6B57C458109115ECD795ED39305, int32_t*, int32_t*, bool >::Invoke(7 /* System.Buffers.OperationStatus System.Text.Encodings.Web.TextEncoder::EncodeUtf8(System.ReadOnlySpan`1<System.Byte>,System.Span`1<System.Byte>,System.Int32&,System.Int32&,System.Boolean) */, L_0, L_1, L_2, (&V_1), (&V_2), (bool)1);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'const ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3920:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t6F910E7283F7E67D8D480958244C54E753B2F70A' to 'ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D &&' for 1st argument
    struct ReadOnlySpan_1_tA850A6C0E88ABBA37646A078ACBC24D6D5FD9B4D
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:107:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:17530:379: error: no viable conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1'
    L_3 = VirtualFuncInvoker5< int32_t, ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1, Span_1_tEDDF15FCF9EC6DEBA0F696BAACDDBAB9D92C252D, int32_t*, int32_t*, bool >::Invoke(8 /* System.Buffers.OperationStatus System.Text.Encodings.Web.TextEncoder::Encode(System.ReadOnlySpan`1<System.Char>,System.Span`1<System.Char>,System.Int32&,System.Int32&,System.Boolean) */, L_0, L_1, L_2, (&V_1), (&V_2), (bool)1);
    ^~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3929:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'const ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1 &' for 1st argument
    struct ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:3929:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ReadOnlySpan_1_t0846CD1BEF355AE12F9A41FFB292AA4A85F072F3' to 'ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1 &&' for 1st argument
    struct ReadOnlySpan_1_t59614EA6E51A945A32B02AB17FBCBDF9A5C419C1
    ^
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/System.Text.Json3.cpp:107:72: note: passing argument to parameter 'p1' here
    static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
    ^
    3 errors generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4g2s2/a9ur_Sentry2.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry2.cpp:14301:9: error: no matching function for call to 'JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553'
    L_3 = JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553(L_1, L_2, NULL);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry2.cpp:8474:92: note: candidate function not viable: no known conversion from 'ReadOnlyMemory_1_t63F301BF893B0AB689953D86A641168CA66D2399' to 'ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE' for 1st argument
    IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR JsonDocument_tF96A1F7D1D40932B5EA6A97DA06E150B6CBDBE6F* JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553 (ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE ___utf8Json0, JsonDocumentOptions_t46D96C339522F4321E0FA1BD1DB3ABE2F300299B ___options1, const RuntimeMethod* method) ;
    ^
    1 error generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/4t7v3/a9ur_Sentry2.o failed with output:
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry2.cpp:14301:9: error: no matching function for call to 'JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553'
    L_3 = JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553(L_1, L_2, NULL);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/bitfox/_Workspace/Repro/Library/Bee/artifacts/MacStandalonePlayerBuildProgram/il2cppOutput/cpp/Sentry2.cpp:8474:92: note: candidate function not viable: no known conversion from 'ReadOnlyMemory_1_t63F301BF893B0AB689953D86A641168CA66D2399' to 'ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE' for 1st argument
    IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR JsonDocument_tF96A1F7D1D40932B5EA6A97DA06E150B6CBDBE6F* JsonDocument_Parse_mE46B7E2E265D68AC7F01388A2BA334F972FD0553 (ReadOnlyMemory_1_t43203E8B19A7F4A97A9A49363F67C206E8B058FE ___utf8Json0, JsonDocumentOptions_t46D96C339522F4321E0FA1BD1DB3ABE2F300299B ___options1, const RuntimeMethod* method) ;
    ^
    1 error generated.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    BuildFailedException: Incremental Player build failed!
    UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:556)
    UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:115)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    Build completed with a result of 'Failed' in 159 seconds (158779 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 8 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002cc] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    It's worth noting that when embedding the package that was built with .NET Standard 2.0 it works just fine.
    I've created a repro here: https://github.com/getsentry/2021.2_IL2CPP_Repro
     
    bruno-garcia likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,072
    That's great but Unity does not troll these forums waiting for a bug to snap up and work on.

    Instead use the Help -> Report Bug feature inside of Unity with the smallest possible package, and include steps to repro.
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Yes, please drop us a but report as @Kurt-Dekker mentions. Thanks!
     
  4. Stefan-Jandl

    Stefan-Jandl

    Joined:
    Jan 17, 2022
    Posts:
    6
    Will do, thanks!
     
    JoshPeterson likes this.