Search Unity

[Case 1184154] Unity 2019.3 Build failed because of Burst and Mathematics

Discussion in 'Burst' started by iamarugin, Sep 19, 2019.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Unity 2019.3
    Burst 1.1.2
    Mathematics 1.1.0

    When I tried to build the project, build failed with the folowing error:

    Code (CSharp):
    1. Unexpected error while processing function `System.Collections.Generic.IEqualityComparer`1<int>.GetHashCode(System.Collections.Generic.IEqualityComparer`1<int>* this, int obj)`. Reason: ��뫪� �� ��ꥪ� �� 㪠�뢠�� �� �������� ��ꥪ�.
    2. at Unity.Mathematics.noise.taylorInvSqrt(Unity.Mathematics.float4 r) (at C:\Unity\rocket_science\Library\PackageCache\com.unity.mathematics@1.1.0\Unity.Mathematics\Noise\common.cs:23)
    3. at Unity.Mathematics.noise.snoise(Unity.Mathematics.float3 v) (at ...
    4.  
    5.  
    6. Internal compiler exception: System.NullReferenceException: ��뫪� �� ��ꥪ� �� 㪠�뢠�� �� �������� ��ꥪ�.
    7.    � Burst.Compiler.IL.Helpers.CecilExtensions.IsDelegate(TypeDefinition typeDef)
    8.    � Burst.Compiler.IL.Intrinsics.FunctionPointerProcessor.IsDelegateInvoke(ILFunctionReference method)
    9.    � Burst.Compiler.IL.Syntax.ILBuilder.IsIntrinsicCall(ILFunctionReference binding, Boolean& dontVisitImpl)
    10.    � Burst.Compiler.IL.Syntax.ILBuilder.CreateFunctionFromRef(ILFunctionReference funcRef)
    11.    � Burst.Compiler.IL.Syntax.ILBuilder.VisitPendingFunctionReferences()
    12.  
     
  2. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Just to note: we've seen this issue and the associated case, and are in the process of looking into this. I'll keep you posted!
     
    MNNoxMortem likes this.
  3. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Thanks!
     
    sheredom likes this.
  4. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    118
    I think I've identified the problem, will DM you.
     
    MNNoxMortem likes this.
  5. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    What are you doing to cause this? I've yet to experience it.
     
  6. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    You should avoid using static managed objects in the Burst Jobs. In my case it was static managed Dictionary, that I used in the Burst Job. When I replaced that with method, everything works again. Thanks to @Lee_Hammerton for clarification.
     
    sheredom and Lee_Hammerton like this.
  7. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    And just to be clear - the compiler should have done a better job at telling you that, and we're going to fix that too :)
     
    MNNoxMortem and iamarugin like this.