Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

Notifications
Clear all

[4.0 Beta 12] Auto assignment to itself caused exception  

   RSS

0

Hi,

If a job on calling done procedure has an estimated time when calling the Start auto assignment it starts that job even though it is complete. The job starts correctly although it isn't in the assignments window and when hitting done I get either a pointer error or an access violation.

 

Wasn't an issue in V3 and I have removed the estimate from the job which seems to have cleared it up.

 

I did also have a job which didn't have an estimate start but I havn't managed to recreate that in an example, I will try again in future to make it happen!

 

Sample code to cause the issue:

[job-This job first]
run=Daily
muststart=1
EndTime=23:58
estimate=00:20
DoneProcedure=Start_auto_period

[job-This job should auto]
run=Daily
muststart=1
EndTime=23:59
estimate=00:20

[Procedure-Start_auto_period]
StartAutoAssign=ask

Extract from report.htm:

th 01 13:20:26 Started This job first

th 01 13:20:28 Done: This job first

th 01 13:20:28 This job first lasted 1 second
th 01 13:20:30 slave replies time available: 59 minutes 59 seconds
th 01 13:20:30 Automatic assignments until 2020-10-01 14:20:30

th 01 13:20:30 "Now: This job first"

th 01 13:20:34 Response time 3 seconds
th 01 13:20:34 Started This job first

th 01 13:23:01 Done:

th 01 13:23:01 Access violation at address 00000000 in module 'VirMst4.exe'. Read of address 00000000
th 01 13:23:01 > DoQuickReport -1
th 01 13:23:01 > MarkTaskDone
th 01 13:23:01 > Taskdef.Stop
th 01 13:23:01 > Taskdef.Save
th 01 13:23:01 > tDatamodule1.AppException

th 01 13:23:01 "Now: This job should auto"

th 01 13:24:25 Response time 1 minute 23 seconds
th 01 13:24:25 Started This job should auto

 

 

7 Answers
0

Thank you. I will look at it soon.

Sven B.

0

There is definitely an issue with jobs without estimates being added as an automatic assignment, I haven't managed to get it to play up in sample code as of yet. I will have another play when I get a chance but if you are poking around that area of the code might be worth looking for anything obvious!

0

I have fund the problem with DoneProcedure. It will be solved in the next release.

There are situations where assignments can be autoassigned without an estimate. An example is time bases punishments. I am not sure if it can happen to jobs as well.

I will need to see the definition of the job that has been started, to have a chance to solve the problem.

Sven

0

Hi Sven,

I had some time available to look into it. It appears that if a mintime is set on the job it is using that instead of the estimate.

For example:

[job-This job should not auto start]
run=Daily
muststart=1
MinTime=00:30

 

If I say I have 31 minutes free it will auto start. If I say I have 29 it won't.

 

I have a work around where I have set the estimates to 23 hrs on anything I don't want to auto.

 

0

Yes, that's the way it is designed. If the program can create an estimate, it will use that and autoassign the assignment.

Maybe I should add a keyword to prevent autoassign. But your workaround is a find way to do it.

Sven

 

0

Understandable, V3 however didn't appear to function in that way.

 

Keyword would be a slightly neater solution to the problem but not essential.

0

I don't remember having changed anything in regarding to autoassign in version 4. But it is so long since I have started on version 4, so I might not remember.

The problem with the job restating itself is solved in the new version 13.

Sven