# Invalid IVideoRenderElement pointer in event method onRenderDataTypeChanged

**URL:** <https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200>\
**Category:** Windows\
**Created:** [August 21, 2021, 9:51am UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200 "2021-08-21T09:51:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weisheit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/weisheit/32/18276_2.png) [@Weisheit](https://devforum.zoom.us/u/Weisheit)\
**Post date:** [August 21, 2021, 9:51am UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/1 "2021-08-21T09:51:13Z")

</div>

In your sample code, the following method is called with an invalid IVideoRenderElement pointer:  
File: custom\_ui\_mgr.cpp line 95  
Original code:

```auto
void CCustomizeInMeetingUIMgr::onRenderDataTypeChanged(ZOOM_SDK_NAMESPACE::IVideoRenderElement* pElement, ZOOM_SDK_NAMESPACE::VideoRenderDataType dataType)
{
}

```

My code for testing:

```auto
Void CustomizeInMeetingUIMgr::onRenderDataTypeChanged(ZOOM_SDK_NAMESPACE::IVideoRenderElement* pElement, ZOOM_SDK_NAMESPACE::VideoRenderDataType dataType)
{
   ZOOM_SDK_NAMESPACE::VideoRenderElementType eType;
   eType = pElement->GetType();
}

```

Must be the IVideoRenderElement\* ignored If the datatype is VideoRenderData\_None? Because it’s unintialized! If so, I would expect a nullptr for the pElement;

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 23, 2021, 11:38pm UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/2 "2021-08-23T23:38:40Z")

</div>

Hey @Weisheit,

Thanks for using the dev forum!

Is this in the latest version of the SDK?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![Weisheit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/weisheit/32/18276_2.png) [@Weisheit](https://devforum.zoom.us/u/Weisheit)\
**Post date:** [August 24, 2021, 9:13am UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/3 "2021-08-24T09:13:16Z")

</div>

It can be reproduced with all SDK versions. From 5,5 till 5.7.1.644.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 24, 2021, 9:02pm UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/4 "2021-08-24T21:02:51Z")

</div>

Hey @Weisheit,

Awesome, thank you for providing that. So the issue is that onRenderDataTypeChanged always returns an invalid pointer to IVideoRenderElement?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![Weisheit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/weisheit/32/18276_2.png) [@Weisheit](https://devforum.zoom.us/u/Weisheit)\
**Post date:** [August 25, 2021, 7:56am UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/5 "2021-08-25T07:56:13Z")

</div>

You can reproduce it in your sample code. If you join a meeting, the preview video element will be destroyed. After that, the function above is called and the IVideorenderElement is invalid. If you call the GetType method, the app will crash. Since the dataType parameter is VideoRenderData\_None, I don’t know if this is correct or a bug. If it’s correct, I expect the IVideorenderElement to be a null pointer. Simply run your own sample code and insert the GetType call above to check it out.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 30, 2021, 7:59pm UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/6 "2021-08-30T19:59:14Z")

</div>

Hey @Weisheit,

I have reproduced this issue. Will submit a bug report for this. Stay tuned.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 7, 2021, 5:21pm UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/7 "2021-09-07T17:21:46Z")

</div>

Hey @Weisheit,

We have identified the root cause of this issue and plan to have a fix for it in the next major release.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 8, 2021, 3:22am UTC](https://devforum.zoom.us/t/invalid-ivideorenderelement-pointer-in-event-method-onrenderdatatypechanged/56200/8 "2021-10-08T03:22:11Z")

</div>

Closed on October 8, 2021, 3:22am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
