Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Assertion failed 'jobData->range.numJobs == 1'

Discussion in 'Entity Component System' started by tarahugger, Aug 8, 2019.

  1. tarahugger

    tarahugger

    Joined:
    Jul 18, 2014
    Posts:
    129
    I'm seeing this log error and searches are coming up empty for what this could mean.

    Code (CSharp):
    1. Assertion failed on expression: 'jobData->range.numJobs == 1'
    2. Unity.Jobs.LowLevel.Unsafe.JobsUtility:ScheduleParallelFor_Injected(JobScheduleParameters&, Int32, Int32, JobHandle&)
    3. Unity.Jobs.LowLevel.Unsafe.JobsUtility:ScheduleParallelFor(JobScheduleParameters&, Int32, Int32)
    4. Unity.Entities.JobChunkExtensions:ScheduleInternal(ReactJob&, EntityQuery, JobHandle, ScheduleMode) (at Library/PackageCache/com.unity.entities@0.1.0-preview/Unity.Entities/IJobChunk.cs:141)
    5. Unity.Entities.JobChunkExtensions:Run(ReactJob, EntityQuery) (at Library/PackageCache/com.unity.entities@0.1.0-preview/Unity.Entities/IJobChunk.cs:100)
    It happens to be only about 5% of the time, for an IJobChunk that I'm running, the rest of the ticks it works fine. The message makes no sense to me, why would 'the number of jobs being 1' prevent a new job being scheduled?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Not sure. Can you try to make it happen more reproducably and file a bug report?
     
  3. tarahugger

    tarahugger

    Joined:
    Jul 18, 2014
    Posts:
    129
    I'll do that; I was using Run() in a ComponentSystem update, Switching to a JobComponentSystem and using Schedule() with inputDeps resolved the issue.