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

App crashes when USB cord is pulled immediately after accessory setup #749

Closed
NicoleYarroch opened this issue Sep 21, 2017 · 1 comment
Closed
Assignees
Labels
bug A defect in the library
Milestone

Comments

@NicoleYarroch
Copy link
Contributor

NicoleYarroch commented Sep 21, 2017

Bug Report

When app is connected to a SDL accessory via a iAP connection, the app crashes when USB cord is pulled right after the icon shows up on the screen, but before the app launches on the SDL HMI. This bug is an edge case is is difficult to reproduce.

There are three issues that may be at play

  1. Notifications are not being unsubscribed to properly in the SDLIAPTransport class. As a result, the app crashes
  2. A NSException in the SDLStateMachine is force quitting the app because of invalid state transitions. The ones I have found so far are:
    • old state: Reconnecting, new state: SettingUpHMI
    • old state: Ready, new state: Started
    • old state: Shutdown, new state: StartupError
  3. NSStreams in the SDLIAPTransport class are not being closed properly before dealloc is being called.
    • This is because the SDLStreamDelegate is being set to nil before the input and output streams are are closed and released.
Reproduction Steps
  1. Use a iAP connection to connect the SDL Example app to a TDK.
  2. Launch the app on SDL HMI.
  3. Wait until the app has launched and the app has completed setup on the SDL HMI.
  4. The app should be in the foreground, pull the USB cord.
  5. The app should be in the foreground, reconnect the USB cord. As soon as the app-icon appears on the HMI, but before the app launches, pull the USB cord.
  6. The app should crash. (It might take several tries for this to happen - repeat 4 and 5 as necessary)
Expected Behavior

The app should never crash

Observed Behavior

The app crashes

OS & Version Information
  • iOS Version: iOS 10 and 11
  • SDL iOS Version: 5.0.0 and 4.7
  • Testing Against: The SDL_Example app and a TDK (SYNC 3.0)
@NicoleYarroch NicoleYarroch self-assigned this Sep 21, 2017
@NicoleYarroch NicoleYarroch added the bug A defect in the library label Sep 21, 2017
@NicoleYarroch NicoleYarroch modified the milestones: 5.0.0, 4.7.x Sep 21, 2017
@joeljfischer joeljfischer modified the milestones: 5.0.0, 4.7.x Nov 30, 2017
@NicoleYarroch
Copy link
Contributor Author

This bug can not be recreated on v. 5.2. Closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
None yet
Development

No branches or pull requests

2 participants