Hello,
I am using Unity 6 (6000.0.42f1) and my game is running on multiple c# jobs. In editor is working everything ok, but on android build I am getting crashes and Android logcat is pointing to some c# jobs.
This is my job (simplified version):
[BurstCompile]
struct Second_DoubleDensityRelaxation_Job : IJobFor
{
[NativeDisableParallelForRestriction]
public NativeArray<float2> particles_positions;
[ReadOnly]
public float H;
[ReadOnly]
public KnnContainer tree;
// The code actually running on the job
public void Execute(int i)
{
NativeList<int> neighbours = new NativeList<int>(Allocator.Temp);
findNeighbours(tree, particles_positions, i, H, neighbours);
foreach(int id in neighbours){
float2 rij = particles_positions[id] - particles_positions[i];
float rij_length = math.length(rij);
float q = rij_length / H;
if(q == 0){
float2 repairVector = // some calculation
particles_positions[id] += repairVector;
}
else if(q < 1){
float2 D = // some calculation
particles_positions[id] += D / 2;
}
}
}