# AVPlayerLayer retain\]: message sent to deallocated instance

**URL:** <https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642>\
**Category:** Support\
**Tags:** bitmovin-player, ios, bitmovin\
**Created:** [January 19, 2023, 10:30am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642 "2023-01-19T10:30:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nethaji.baddili](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nethaji.baddili](https://community.bitmovin.com/u/nethaji.baddili)\
**Post date:** [January 19, 2023, 10:30am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/1 "2023-01-19T10:30:54Z")

</div>

On iOS App from full screen player (native screen) to PIP mode and again back to full screen player view. When I am trying to pause() the player, app is getting crashed with **AVPlayerLayer retain]: message sent to deallocated instance** on iOS 16.2. Other than pause action like forward, rewind, mute were working fine.

---

<div class="post-metadata">

**Author:** ![davidsteinacher](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/davidsteinacher/32/163_2.png) [@davidsteinacher](https://community.bitmovin.com/u/davidsteinacher)\
**Post date:** [January 19, 2023, 2:21pm UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/2 "2023-01-19T14:21:45Z")

</div>

Hi @nethaji.baddili,

Could you provide more information about

- the `FullscreenHandler` that you implemented in your application?
- the exact `PlayerConfig` and `PlayerViewConfig` you are using?
- on which iOS version you are experiencing the crash?

Best would be if you could share a sample App where this can be reproduced.  
See our samples [here](https://github.com/bitmovin/bitmovin-player-ios-samples).

---

<div class="post-metadata">

**Author:** ![nethaji.baddili](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nethaji.baddili](https://community.bitmovin.com/u/nethaji.baddili)\
**Post date:** [January 19, 2023, 2:57pm UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/3 "2023-01-19T14:57:16Z")

</div>

> [@davidsteinacher](#):
>
> PlayerConfig

For Full screen we were using **var** fullscreenPlayerViewController = AVPlayerViewController()  
iOS Version: 16.2  
PlayerConfig:  
playerConfig.playbackConfig.isBackgroundPlaybackEnabled = true  
playerConfig.playbackConfig.isPictureInPictureEnabled = true  
playerConfig.styleConfig.userInterfaceType = .system  
playerConfig.playbackConfig.isAutoplayEnabled = true  
playerConfig.playbackConfig.isMuted = true

```
    let tweaksConfig = TweaksConfig()
    tweaksConfig.isCustomHlsLoadingEnabled = false
    tweaksConfig.isNativeHlsParsingEnabled = true
    playerConfig.tweaksConfig = tweaksConfig

```

---

<div class="post-metadata">

**Author:** ![davidsteinacher](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/davidsteinacher/32/163_2.png) [@davidsteinacher](https://community.bitmovin.com/u/davidsteinacher)\
**Post date:** [January 19, 2023, 5:11pm UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/4 "2023-01-19T17:11:22Z")

</div>

Thank you for the details.  
One thing I forgot to ask is which SDK version you are using? I assume the latest one, `3.33.0`.

I’m currently unable to reproduce the issue on my side. Could you try our `BasicFullscreenHandling` from our [samples repo](https://github.com/bitmovin/bitmovin-player-ios-samples) with your configuration and see if you can reproduce it there?

Otherwise, a sample App where we could reproduce this issue would be helpful.

---

<div class="post-metadata">

**Author:** ![nethaji.baddili](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nethaji.baddili](https://community.bitmovin.com/u/nethaji.baddili)\
**Post date:** [January 20, 2023, 3:55am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/5 "2023-01-20T03:55:40Z")

</div>

if possible can we connect so that I can share my screen to get it resolved. I will be available on IST hours.

---

<div class="post-metadata">

**Author:** ![davidsteinacher](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/davidsteinacher/32/163_2.png) [@davidsteinacher](https://community.bitmovin.com/u/davidsteinacher)\
**Post date:** [January 20, 2023, 11:27am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/6 "2023-01-20T11:27:08Z")

</div>

In case we can not figure out what the problem and you require additional technical support, please login to your Bitmovin Dashboard at [Bitmovin Dashboard](https://bitmovin.com/dashboard) and [create a new support case](https://bitmovin.com/dashboard/support/cases/create). Our team will get back to you as soon as possible.

---

<div class="post-metadata">

**Author:** ![nethaji.baddili](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nethaji.baddili](https://community.bitmovin.com/u/nethaji.baddili)\
**Post date:** [January 24, 2023, 8:36am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/7 "2023-01-24T08:36:15Z")

</div>

> [@nethaji.baddili](#):
>
> On iOS App from full screen player (native screen) to PIP mode and again back to full screen player view. When I am trying to pause() the player, app is getting crashed with **AVPlayerLayer retain]: message sent to deallocated instance** on iOS 16.2. Other than pause action like forward, rewind, mute were working fine.

I have raised couple of tickets for technical support for the above issue. I didn’t get any response or reply from Bitmovin Technical Support team. And also am not able to find the raised requests place holder in the website.

---

<div class="post-metadata">

**Author:** ![davidsteinacher](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/davidsteinacher/32/163_2.png) [@davidsteinacher](https://community.bitmovin.com/u/davidsteinacher)\
**Post date:** [January 25, 2023, 7:39am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/8 "2023-01-25T07:39:36Z")

</div>

I forwarded your request internally to our team, and we will check and come back to you.

---

<div class="post-metadata">

**Author:** ![nethaji.baddili](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nethaji.baddili](https://community.bitmovin.com/u/nethaji.baddili)\
**Post date:** [January 31, 2023, 10:45am UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/9 "2023-01-31T10:45:40Z")

</div>

Hi David,  
Could you please help me out on reaching the Bitmovin technical support team to resolve my issue.  
As it is critical for our app, and also Gartner is a Bitmovn licensed holder.

Kindly setup a call asap to resolve my issue.

Thanks.

---

<div class="post-metadata">

**Author:** ![gernot.zwantschko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/gernot.zwantschko/32/309_2.png) [@gernot.zwantschko](https://community.bitmovin.com/u/gernot.zwantschko)\
**Post date:** [January 31, 2023, 2:41pm UTC](https://community.bitmovin.com/t/avplayerlayer-retain-message-sent-to-deallocated-instance/1642/10 "2023-01-31T14:41:23Z")

</div>

Hi Nethaji,

thanks for reaching out!

I looked into it why you did get no response to your ticket yet. I found that your own Bitmovin Account is not associated with the Company Account of Gartner, hence you are not able to raise any tickets on their behalf right now. Because of that, your request got pushed to our general user queue which had an issue at the time you raised your ticket and didn’t get processed properly. Hence it wasn’t possible for our team to react to your request.

Next steps:

- Please make sure that your Bitmovin Account Administrator invites you as a User to the Main Company Account, so you can raise Tickets on their behalf.
- I’ve identified your initial request and managed to recover it, so you should receive an email from our system any minute. Please use this ticket to continue the conversation with our team.
- Future Tickets, please make sure to raise through the main account of your company.

This being said, our team will get in contact with you soon to make sure the issue is understood, and which steps can be taken next.

Thank you very much for your patience!

Best regards,  
Gernot (Head of Support, Global)
