Skip to content
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

Merged
merged 4 commits into from Mar 14, 2019
Merged

Conversation

frederoni
Copy link
Contributor

@frederoni frederoni commented Mar 14, 2019

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

@frederoni frederoni requested review from 1ec5 and JThramer March 14, 2019 12:49
XCTAssertEqual(points[2].type, .spoken)

XCTAssertEqual(points[3].legIndex, 0)
XCTAssertEqual(points[3].stepIndex, 1)
Copy link
Contributor Author

@frederoni frederoni Mar 14, 2019

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.

@frederoni frederoni marked this pull request as ready for review March 14, 2019 13:20
@frederoni frederoni added the bug Something isn’t working label Mar 14, 2019
Copy link
Contributor

@JThramer JThramer left a 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!

@akitchen akitchen added this to the v0.30.0 milestone Mar 14, 2019
Copy link
Contributor

@1ec5 1ec5 left a 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.

@frederoni frederoni merged commit b59c6c7 into master Mar 14, 2019
@frederoni frederoni deleted the fix-progress-order branch March 14, 2019 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants