Closed davidswi closed 2 years ago
I have been unable to reproduce this bug using the SDL Example app. While testing I did find that the app crashes if the USB cord is disconnected right after the app icon is set up but before the HMI is setup. I have created a WIP Pull Request #752 to fix said bug.
It would be helpful to know where in the lifecycle the bug is happening. Is it when the USB cord is disconnected while accessory setup is occurring or after it has been connected/disconnected several times, or some other point in the lifecycle?
I just had this error occur after pulling the USB cord multiple times. It looks like there is no error handling occurring in the SDLIAPSession
's stop
method when the ioStreamThread
fails to cancel. The ioStreamThread
then gets set to nil even though the NSStream
is still open. This causes the app to crash.
I've added logs for the crashed app session for the Streaming Video Example app. NSStream Crash 2017-09-25-09:19:10-smartdevicelink.log
I've reviewed the changes to this PR and it seems fine to me. I'd like to know why the ioStreamThread is not canceling within the dispatch semaphore timeout period. I think that needs to be investigated and resolved if possible.
Issue has reported again on v. 5.2.
I just had this error occur after pulling the USB cord multiple times. It looks like there is no error handling occurring in the SDLIAPSession's stop method when the ioStreamThread fails to cancel. The ioStreamThread then gets set to nil even though the NSStream is still open. This causes the app to crash.
Reproducible steps from the iOS Slack Channel from Vlad
May be related to issue #1002
@NicoleYarroch was this fixed with #1011
Bug Report
In automated USB connect/disconnect testing with 30s cycle time, there appears to be a timing issue where the SDLIAPTransport dealloc method is called with an open control session and without disconnect being called. This will cause the open output stream to call the dealloc'ed delegate, resulting in a crash.
Reproduction Steps
Expected Behavior
No crashes, app resumes after every reconnection
Observed Behavior
App crashes with trace similar to:
OS & Version Information
Test Case, Sample Code, and / or Example App
This should be reproducible with the SDL example app.