Null Reference when Scheduling

In the last two weeks my scheduling has went from working mediocrely to not working at all. I cannot find the error after searching through both settings and multiple jobs and reading through the error message is not enlightening me as to where I need to look. If anyone else can make sense of this and point me in the correct direction, it would be greatly appreciated.

07:52:53 MRP finite scheduling process begin.
07:52:53 ------------------------------------------------------------
07:52:53 Cut Off Date                      -> 
07:52:53 Schedule Start Date               -> 1/19/2022 12:00:00 AM
07:52:53 Run Finite Scheduling             -> True
07:52:53 Ignore Constrained Materials      -> False
07:52:53 Allow Historical Dates            -> False
07:52:53 Use Production Preparation Buffer -> True
07:52:53 ------------------------------------------------------------
07:52:53 Process Control Queue
07:52:53   Group -> Job; Queue -> SchedJobF; Type -> Job; Finite -> True
07:52:53   Group -> Job; Queue -> SchedJobI; Type -> Job; Finite -> False
07:52:53     Check List -> SchedJobF~SchedJobI; Last Group -> False
07:52:53   Group -> Load; Queue -> SaveLoad; Type -> Job; Finite -> False
07:52:53     Check List -> SaveLoad; Last Group -> True
07:52:53 ------------------------------------------------------------
07:53:01 Starting Part Level: 0-0.  Wait Time: 00h:00m:00s:000ms, Jobs: 0
07:53:01 Scheduling new unfirm job:054022
07:53:06 The job is currently scheduled to finish 6/12/2024. It will not meet its required date of 12/31/2021 as  the Company doesn’t allow scheduling in the past.
07:53:06 Done Scheduling job:054022 sending job to queue SaveLoad
07:53:06 Scheduling new unfirm job:003717-1-1
07:53:21 System.NullReferenceException: Object reference not set to an instance of an object.
   at Erp.Internal.ES.SchedEngine.MoveJobItem(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int32 ttScheduleEngineAllocNum, String& WarnLogTxt, Boolean ttScheduleEngineMinimizeWIP, Nullable`1 ipOverrideBounceDate) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 15565
   at Erp.Internal.ES.SchedEngine.doMultiSchedule(ScheduleEngineRow ScheduleEngine, Boolean scheduleDirection, Nullable`1 ipDate, Int32 ipTime, List`1 ipSchedItemRows, Boolean ipDoingPartial) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14860
   at Erp.Internal.ES.SchedEngine.moveMultiJobItem(ScheduleEngineRow ttScheduleEngine, List`1 ipSchedItemRows, List`1 ipSchedRelItemRows) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 15330
   at Erp.Internal.ES.SchedEngine.MoveItem(ScheduleEngineRow ttScheduleEngine, String& opWarnLogTxt) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14541
   at Erp.Internal.ES.SchedEngine.MoveGlobalJob(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int64 instancetasknum, Int32 ttScheduleEngineAllocNum, Nullable`1 GlobalBounceDate, Decimal GlobalBounceTimeParam, Boolean ttLogfile, Boolean multiJob, String& WarnLogTxt, Boolean ignoreLocks, Boolean ipMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14122
   at Erp.Internal.MR.MrpExpSched.schedUnfirmJob(Int64 instance_TaskNum, Boolean finiteLoad, Boolean whatif, String new_job_num, String jobFlag, Boolean firmFlag, Nullable`1 jobStartDate, Int32 jobStartTime, Boolean jobForward, Int32 pLevel, Boolean pMethod, Int32 jobPri, String pOutQueue, String qText, String pInQueue, String pOutQueue1, String pOutType, String pOutType1, Int32 pSubLLC, String procSource, Int32 processNum, Nullable`1 Sched_startDate, String logfile, Int32 loglevel, Boolean ignoreConst, Boolean allowHistDate, Decimal GSStartTime, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP, Boolean& errFlag) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 0
   at Erp.Internal.MR.MrpExpSched.main_block(Int64 instance_TaskNum, Boolean netchg, String IP_plantList, Nullable`1 cutoff_date, Boolean from_autopur, String logfile, Int32 loglevel, Boolean finiteLoad, Boolean ignoreConst, Boolean allowHistDate, Boolean usePrepTime, Boolean useKitTime, Boolean runPegging, Boolean runConPur, Nullable`1 Sched_startDate, String ShipViaDefault, String compBuyerID, Int32 ForeDaysB, Int32 ForeDaysA, String v_defaultSchedCode, String extComp, String PlantSelected, String plantprefixlist, String pReqType, Int32 processNum, String purDir, Boolean whatif, String procSource, Decimal GSStartTime, Boolean delaySched, Boolean recyclejobs, Boolean rcSchedGetDetails, Boolean includePCParts, Boolean useQuoteBOM, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 3613
   at Erp.Internal.MR.MrpExpSched.RunMrpExpSched(Int64 instance_TaskNum, Boolean netchg, String IP_plantList, Nullable`1 cutoff_date, Boolean from_autopur, String logfile, Int32 loglevel, Boolean finiteLoad, Boolean ignoreConst, Boolean allowHistDate, Boolean usePrepTime, Boolean useKitTime, Boolean runPegging, Boolean runConPur, Nullable`1 Sched_startDate, String ShipViaDefault, String compBuyerID, Int32 ForeDaysB, Int32 ForeDaysA, String v_defaultSchedCode, String extComp, String PlantSelected, String plantprefixlist, String pReqType, Int32 processNum, String purDir, Boolean whatif, String procSource, Decimal GSStartTime, Boolean delaySched, Boolean recyclejobs, Boolean rcSchedGetDetails, Boolean includePCParts, Boolean useQuoteBOM, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 1034
   at Erp.Internal.MR.MrpExpSched.RunSubProcess(List`1 Parameters) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 739

07:53:21    at Erp.Internal.ES.SchedEngine.MoveJobItem(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int32 ttScheduleEngineAllocNum, String& WarnLogTxt, Boolean ttScheduleEngineMinimizeWIP, Nullable`1 ipOverrideBounceDate) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 15565
   at Erp.Internal.ES.SchedEngine.doMultiSchedule(ScheduleEngineRow ScheduleEngine, Boolean scheduleDirection, Nullable`1 ipDate, Int32 ipTime, List`1 ipSchedItemRows, Boolean ipDoingPartial) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14860
   at Erp.Internal.ES.SchedEngine.moveMultiJobItem(ScheduleEngineRow ttScheduleEngine, List`1 ipSchedItemRows, List`1 ipSchedRelItemRows) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 15330
   at Erp.Internal.ES.SchedEngine.MoveItem(ScheduleEngineRow ttScheduleEngine, String& opWarnLogTxt) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14541
   at Erp.Internal.ES.SchedEngine.MoveGlobalJob(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int64 instancetasknum, Int32 ttScheduleEngineAllocNum, Nullable`1 GlobalBounceDate, Decimal GlobalBounceTimeParam, Boolean ttLogfile, Boolean multiJob, String& WarnLogTxt, Boolean ignoreLocks, Boolean ipMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14122
   at Erp.Internal.MR.MrpExpSched.schedUnfirmJob(Int64 instance_TaskNum, Boolean finiteLoad, Boolean whatif, String new_job_num, String jobFlag, Boolean firmFlag, Nullable`1 jobStartDate, Int32 jobStartTime, Boolean jobForward, Int32 pLevel, Boolean pMethod, Int32 jobPri, String pOutQueue, String qText, String pInQueue, String pOutQueue1, String pOutType, String pOutType1, Int32 pSubLLC, String procSource, Int32 processNum, Nullable`1 Sched_startDate, String logfile, Int32 loglevel, Boolean ignoreConst, Boolean allowHistDate, Decimal GSStartTime, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP, Boolean& errFlag) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 0
   at Erp.Internal.MR.MrpExpSched.main_block(Int64 instance_TaskNum, Boolean netchg, String IP_plantList, Nullable`1 cutoff_date, Boolean from_autopur, String logfile, Int32 loglevel, Boolean finiteLoad, Boolean ignoreConst, Boolean allowHistDate, Boolean usePrepTime, Boolean useKitTime, Boolean runPegging, Boolean runConPur, Nullable`1 Sched_startDate, String ShipViaDefault, String compBuyerID, Int32 ForeDaysB, Int32 ForeDaysA, String v_defaultSchedCode, String extComp, String PlantSelected, String plantprefixlist, String pReqType, Int32 processNum, String purDir, Boolean whatif, String procSource, Decimal GSStartTime, Boolean delaySched, Boolean recyclejobs, Boolean rcSchedGetDetails, Boolean includePCParts, Boolean useQuoteBOM, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 3613
   at Erp.Internal.MR.MrpExpSched.RunMrpExpSched(Int64 instance_TaskNum, Boolean netchg, String IP_plantList, Nullable`1 cutoff_date, Boolean from_autopur, String logfile, Int32 loglevel, Boolean finiteLoad, Boolean ignoreConst, Boolean allowHistDate, Boolean usePrepTime, Boolean useKitTime, Boolean runPegging, Boolean runConPur, Nullable`1 Sched_startDate, String ShipViaDefault, String compBuyerID, Int32 ForeDaysB, Int32 ForeDaysA, String v_defaultSchedCode, String extComp, String PlantSelected, String plantprefixlist, String pReqType, Int32 processNum, String purDir, Boolean whatif, String procSource, Decimal GSStartTime, Boolean delaySched, Boolean recyclejobs, Boolean rcSchedGetDetails, Boolean includePCParts, Boolean useQuoteBOM, Boolean multiJob, Boolean multiJobIgnoreLocks, Boolean multiJobMinimizeWIP) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 1034
   at Erp.Internal.MR.MrpExpSched.RunSubProcess(List`1 Parameters) in C:\_Releases\ERP\UD10.1.500.18\Source\Server\Internal\MR\MrpExpSched\MrpExpSched.cs:line 739

Just curious if you have you already tried manually scheduling any of the “error” jobs?

The jobs schedule manually without error. I also tried checking my global scheduling priority list to see which job should be scheduled next and it will also manually schedule. I tried the next job because when checking the log file for the job that appears to be an error, in this case 003717-1-1, the last couple lines (it’s a fairly large log file for that job) read:

07:53:19 Update plannedkitdate and Plannedactiondate — WriteJob
07:53:21 Finished writing Job - 003717-1-1. — MoveJobItem
07:53:21 Scheduling Completed for Job 003717-1-1 — MoveJobItem

This led me to think that possibly the next job was hanging up, but both this job and the one listed next on the scheduling order schedule fine if done manually. It’s just when global scheduling is ran that the issues arise. Also, if it make any difference, scheduling doesn’t error out even though the logs make it appear that way. Instead, it simply hangs up.

@TDray I have something similar that was never found. I also have a bpm on MoveJobItem that needs to run so it was never solved. Jobs schedule manually without issues. I just run away from the issue since I have a large virtual machine I set the processes to 50 and schedulers to 99 and hope enough of them don’t crap out to get the run finished.
I am hoping it clears when I get to 11.2.

I’ll try upping my number of processes and schedulers when it runs overnight tonight and see what happens. I’m willing to run away as well if it gets the job done.

Unfortunately, running multiple schedulers did not help. My first scheduler has the same error as above and other ones have the following:

01:20:16 Waiting for next job…

01:40:16 Waiting for next job…

02:00:16 Waiting for next job…

02:20:18 Waiting for next job…

02:40:17 Waiting for next job…

03:00:18 Waiting for next job…

It continues on after that, but you get the point.