New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix progress updates order of execution #2029
Conversation
6a8804b
to
1487aed
Compare
XCTAssertEqual(points[2].type, .spoken) | ||
|
||
XCTAssertEqual(points[3].legIndex, 0) | ||
XCTAssertEqual(points[3].stepIndex, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion failed (prior to 05cc3e7) because stepIndex is 0, indicating that we are going backward in time or the indexes were not in sync, the latter being the case here. spokenInstructionIndex went from 1 to 0 when stepIndex remained on 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really impressive work. What a bug!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested changelog entry:
- Fixed an issue where the wrong instruction could be announced or a crash could occur in some situations when using a
RouteController
.
updateSpokenInstructionProgress(status:willReRoute:)
must happen after step progress and leg progress has been updated to keep the indexes in sync.ref #2004 (comment)
cc @1ec5 @JThramer