Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Conversation

appleguy
Copy link
Contributor

This avoids CoreAnimation from capturing the name from a background thread deep within the internals
of AVPlayerLayer, which commits transactions off the main thread. If the main thread is also accessing
properties that require the lock, in very specific app architectures relying on AVPlayerLayer, this
can cause a deadlock.

The "name" property is primarily used by ASDK's unit test infrastructure, so I'm leaving it in place for
that purpose - and it may still be used for debugging, if someone wants to set it. It will remain
possible to get the node from a layer or view with asyncdisplaykit_node, and access name from there.

This avoids CoreAnimation from capturing the name from a background thread deep within the internals
of AVPlayerLayer, which commits transactions off the main thread.  If the main thread is also accessing
properties that require the lock, in very specific app architectures relying on AVPlayerLayer, this
can cause a deadlock.

The "name" property is primarily used by ASDK's unit test infrastructure, so I'm leaving it in place for
that purpose - and it may still be used for debugging, if someone wants to set it.  It will remain
possible to get the node from a layer or view with asyncdisplaykit_node, and access name from there.
@appleguy
Copy link
Contributor Author

This should, with almost total certainty, resolve #948. Shady Apple!

appleguy added a commit that referenced this pull request Dec 19, 2015
Remove CALayer and UIView implementations of "name" property.
@appleguy appleguy merged commit 8a216dd into master Dec 19, 2015
@appleguy appleguy deleted the ASDisplayNodeName branch December 19, 2015 01:34
@appleguy appleguy added the Bug label Dec 19, 2015
@appleguy appleguy added this to the 1.9.4 milestone Dec 19, 2015
@nguyenhuy
Copy link
Contributor

Didn't know what seems to be a simple and harmless property can mess up
with CoreAnimation! Sorry for any inconvenience caused and thanks for
fixing it :)

On Sat, Dec 19, 2015, 3:34 AM appleguy notifications@github.com wrote:

Merged #956 #956.


Reply to this email directly or view it on GitHub
#956 (comment).

Regards,
Huy Nguyen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants