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

CarPlayManagerTests.testManagerTellsDelegateWhenNavigationStartsAndEndsDueToArrival sporadically crashes on CI #2441

Closed
1ec5 opened this issue Jul 7, 2020 · 4 comments
Assignees
Labels
CarPlay Bugs, improvements and feature requests on Apple CarPlay topic: location
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 7, 2020

CarPlayManagerTests.testManagerTellsDelegateWhenNavigationStartsAndEndsDueToArrival() has been crashing sporadically on CI since we upgraded MapboxNavigationNative in #2412. First step is to see if it keeps happening now that #2417 has landed.

/ref #2439 (comment)
/cc @mapbox/navigation-ios @avi-c

@1ec5 1ec5 added - crash topic: location CarPlay Bugs, improvements and feature requests on Apple CarPlay labels Jul 7, 2020
@1ec5 1ec5 added this to the v1.0.0 milestone Jul 7, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Jul 21, 2020

This might be fixed as part of #2477.

@1ec5
Copy link
Contributor Author

1ec5 commented Jul 22, 2020

This crash was happening sporadically on CI, but I can reproduce it reliably on release-v1.0-pre-release as of db1bb8a when running the test individually:

2020-07-21 18:09:45.481062-0700 Example[88352:8231871] Warning: Attempt to present <MapboxNavigationTests.CarPlayNavigationViewControllerTestable: 0x7fbed2c76a60> on <MapboxNavigation.CarPlayMapViewController: 0x7fbed3b24c90> whose view is not in the window hierarchy!
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /path/to/mapbox-navigation-ios/MapboxNavigationTests/CarPlayManagerTests.swift, line 214
2020-07-21 18:09:45.483130-0700 Example[88352:8231871] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /path/to/mapbox-navigation-ios/MapboxNavigationTests/CarPlayManagerTests.swift, line 214

manager.currentNavigator is nil each time. It never gets retained outside of CarPlayManager.mapTemplate(_:startedTrip:using:), because CarPlayManager.carPlayMapViewController isn’t part of the view hierarchy and can’t present it.

manager.currentNavigator!.exitNavigation(byCanceling: true)

@1ec5
Copy link
Contributor Author

1ec5 commented Jul 22, 2020

We saw basically the same thing in #2360 (comment), but here we are testing whether the CarPlayNavigationViewController (currentNavigator) can exit correctly.

@dersim-davaod
Copy link
Contributor

Checked the current implementation,

testManagerTellsDelegateWhenNavigationStartsAndEndsDueToArrival is stable now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CarPlay Bugs, improvements and feature requests on Apple CarPlay topic: location
Projects
None yet
Development

No branches or pull requests

2 participants