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

IMAPlugin Unowned Self Crash Fix #30

Merged

Conversation

TheoBendixson
Copy link
Contributor

@TheoBendixson TheoBendixson commented Feb 17, 2019

A few months back, me and a few people on the MotorTrend team noticed a crash being reported on Crashlytics.

It was coming from this library in this file in the request timeout handler. I believe there was some kind of a race condition making it possible for the 'self' in the closure to be nil when the closure ran.

We made this change in a forked version of our PlayKit_IMA library, and the crash disappeared from Crashlytics, never to return again.

It appears as though your team has made similar changes to the iOS PlayKit library, fixing crashes that likely resulted from declaring the self in a capture list as unowned. Since self can be nil when the closure gets called, it should be declared weak in the capture list.

I just wanted to point out this issue on the PlayKit_IMA library and how our team fixed it.

@noamtamim
Copy link
Contributor

Hi @TheoBendixson. Thank you for this contribution, we will look at it shortly.

@x-NR-x x-NR-x merged commit 6528c63 into kaltura:develop Mar 25, 2019
@x-NR-x x-NR-x self-assigned this Mar 25, 2019
noamtamim pushed a commit that referenced this pull request Apr 24, 2019
* IMAPlugin Unowned Self Crash Fix (#30)

* Fem 2389 - Seeking to end, sometimes the post roll is not played (#31)

* FEM-2389 Added logic to wait for the Mid-roll to play if exists before contentComplete is called so that the Post-roll can be played if exists.

* FEM-2389 Added a check for a valid CuePoint.
Code cleanup.

* FEM-2467 Swift 4.2 (#32)

* FEM-2467 Updated podspec swift to 4.2
Updated travis to Xcode 10.1

* FEM-2467 Swift 4.2 compilation fixes.

* Fixed blocks using weak self.
Swift 4.2 compilation fixes.

* Removed cocoapods deprecated swift-version file.

* Swift 4.2 upgrade with StrongSelf.

* FEM-2465 Expose Creative ID and Advertiser Name (#34)

* FEM-2465 Support addition of Creative ID and Advertiser Name

* Add dependance to PlayKit v3.9.0

* Updated version to 1.4.0 (#35)

* FEM-2478 Updated to Swift 5, fixed code accordingly. (#36)

* FEM-2478 Updated to Swift 5, fixed code accordingly.
Updated XCGLogger dependence to 7.0.0

* Version 1.5.0

* Travis: just lint
x-NR-x added a commit that referenced this pull request May 21, 2019
* develop:
  Updated version to 1.5.0
  Travis: just lint
  FEM-2478 Updated to Swift 5, fixed code accordingly. (#36)
  Updated version to 1.4.0 (#35)
  FEM-2465 Expose Creative ID and Advertiser Name (#34)
  FEM-2467 Swift 4.2 (#32)
  Fem 2389 - Seeking to end, sometimes the post roll is not played (#31)
  IMAPlugin Unowned Self Crash Fix (#30)

# Conflicts:
#	AdsEnabledPlayerController.swift
#	IMAPlugin.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants