Search Unity

Burst error DCICE005 tiny repro and workaround

Discussion in 'Burst' started by gnostici, Feb 7, 2021.

  1. gnostici

    gnostici

    Joined:
    Jul 27, 2013
    Posts:
    23
    Booleans that self-reference in assignment cause DCICE005.

    Code (CSharp):
    1.          
    2.             bool willFail = true;
    3.          
    4.             Job.WithCode(() =>
    5.             {
    6.                 willFail = willFail && false;
    7.  
    8.             }).WithBurst().Run();
    9.  
    Using a temp avoids the error.

    Code (CSharp):
    1.  
    2.             bool willFail = false;
    3.          
    4.             Job.WithCode(() =>
    5.             {
    6.                 bool temp;
    7.              
    8.                 temp = willFail && false;
    9.                 willFail = temp;
    10.  
    11.             }).WithBurst().Run();
    12.  
    Seen in 2020.2.2f1, Burst 1.4.4
     
    redwren and tree_arb like this.
  2. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Burst errors all begin with BC - so I think this error might be a DOTS issue actually.