The assert is trigged when the train is in state "RUNNING":
After adding prints, I've seen that the issue comes when the train is in Train::runningState. The train tries to set the new position on the track using this->setTrackPosition.
The train is trying to get coordinates for a position on the track. But as the track has no coordinates, the code asserts.
The program is trying to act on the coordinateList that doesn't exist, |
The fix for train::setTrackPosition() is:
No comments:
Post a Comment