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

Crash on EAOutputStream close #1583

Closed
SatbirTanda opened this issue Mar 11, 2020 · 2 comments · Fixed by #1592
Closed

Crash on EAOutputStream close #1583

SatbirTanda opened this issue Mar 11, 2020 · 2 comments · Fixed by #1592
Assignees
Labels
bug A defect in the library transport-iap Relating to the primary IAP transport
Projects

Comments

@SatbirTanda
Copy link
Contributor

Bug Report

App crashes on EAOutputStream close

Reproduction Steps

Unknown

Expected Behavior

Does not crash

Observed Behavior

Crash

OS & Version Information
  • iOS Version: iOS 13.3.1
  • SDL iOS Version: 6.5.0
  • Testing Against: Unknown
Test Case, Sample Code, and / or Example App

Attached are 3 crash log
2020-03-07_16-33-19.1177_-0800-56f13d5b17a6798f17cc510ad61b983cd92fef5d.txt
2020-03-07_22-05-49.2589_-0500-a752a3d0f896ed979b8fff1ebb86ac7459d817cb.txt
2020-03-08_10-57-02.3686_-0600-f66ff644537c9aa2d0c57075a620d170f4875867.txt

@NicoleYarroch NicoleYarroch added the bug A defect in the library label Mar 12, 2020
@NicoleYarroch NicoleYarroch self-assigned this Mar 18, 2020
@NicoleYarroch
Copy link
Contributor

I think I have a fix for this issue. I was only able to reproduce once but the stack trace did not provide any human readable information.

All the crash logs show that the crash occurs when the IAP Control Session attempts to close the output stream. I believe the issue is that the output stream's run loop was created on the lifecycle thread, which means that the lifecycle thread owns the stream. The library then closes the output stream from the main thread. Apple's documentation for streams says You should never attempt to access a scheduled stream from a thread different than the one owning the stream’s run loop.

The IAP Control Session is only created when connecting to legacy units that don't support the multisession protocol. The IAP Data Session opens and closes the streams on the ioThread, which explains why we have not seen this crash on head units that support the multisession protocol.

I will create a PR with a fix.

@NicoleYarroch NicoleYarroch added the transport-iap Relating to the primary IAP transport label Mar 19, 2020
@joeljfischer joeljfischer linked a pull request Mar 23, 2020 that will close this issue
4 tasks
@NicoleYarroch
Copy link
Contributor

Fixed in PR #1592

@NicoleYarroch NicoleYarroch added this to Done in v6.6.0 via automation Mar 24, 2020
@NicoleYarroch NicoleYarroch reopened this Mar 25, 2020
v6.6.0 automation moved this from Done to In progress Mar 25, 2020
v6.6.0 automation moved this from In progress to Done Apr 14, 2020
@joeljfischer joeljfischer mentioned this issue Apr 29, 2020
3 tasks
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 transport-iap Relating to the primary IAP transport
Projects
No open projects
v6.6.0
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants