I've run into an issue with FB_XTS_StationBase causing Page Faults when changing PML states.
There is probably a better way I can be managing the logic here, but what I'm doing:
In an implementation of FB_XTS_StationBase, Execute() calls an InProcess() method if StationState = InProcess. InProcess() is then customized for each station without having to mess with the Execute() logic.
In InProcess(), I'm checking for a failure of the station process and setting the station to Stop using ChangeState(E_PMLCommand.ePMLCommand_Stop)
The issue:
InProcess() detects a failure and sets the station _CurrentState to Stop, and then returns to Execute() indicating that it finished.
Execute() sees that InProcess completed, and sets the StationState to ReleaseMovers.
The next station is a FB_XTS_QueueStation, so it immediately grabs the mover.
Since _CurrentState is no longer Execute, Execute() isn't called anymore and the station stays in StationState ReleaseMovers.
On the next scan, the next station checks CanReleaseMovers, which returns TRUE because the StationState is ReleaseMovers.
It then tries to get a mover when there aren't any, and page faults in FB_XTS_InfoStation.TakeMover() line 8 since the mover doesn't exist.
Adding a check for NumberOfAssignedMovers > 0 in CanReleaseMover.Get solves the issue.
I can probably be managing the states and commanding the stop better, but it seems like having some additional logic in the base station FB to make sure there are movers to release in CanReleaseMovers.Get() would be worthwhile.
I've run into an issue with FB_XTS_StationBase causing Page Faults when changing PML states.
There is probably a better way I can be managing the logic here, but what I'm doing:
The issue:
Adding a check for NumberOfAssignedMovers > 0 in CanReleaseMover.Get solves the issue.
I can probably be managing the states and commanding the stop better, but it seems like having some additional logic in the base station FB to make sure there are movers to release in CanReleaseMovers.Get() would be worthwhile.