Description
Zoom SDK will consistently crash when using the Custom UI and more than 1 person leaves at the same time (within seconds)
Which Desktop Meeting SDK version?
Latest Windows SDK
To Reproduce(If applicable)
Steps to reproduce the behavior:
- Launch Windows sdk with custom UI on
- join a meeting
- have 2 people leave at the same time
- zoom crashes
Device ):
- Device: custom gaming computer
- OS: windows 10
Additional context
Here I modified the Resubscribe normal user function to send data via anon pipe to an unreal application.
void CCustomizeUIVideoMgr::ReSubscribeNormalUser(GalleryViewSubscribeType nType)
{
CalculateTotalPages();
if (0 == m_iGalleryTotalPage)
return;
if (!m_pMainUI)
return;
CSDKUserList* pUserList = m_pMainUI->GetUserList();
if(!pUserList)
return;
int nStart = 0;
int nCurrentPage = m_iGalleryCurrentPage;
switch(nType)
{
case GalleryView_Subscribe_CurrentPage:
break;
case GalleryView_Subscribe_PrePage:
nCurrentPage -= 1;
if(nCurrentPage < 1)
return;
break;
case GalleryView_Subscribe_NextPage:
nCurrentPage += 1;
break;
default:
break;
}
nStart = (nCurrentPage-1) * m_iVideoCountInOnePage;
int nTotalCount = pUserList->GetCount();
if (nStart > nTotalCount - 1)
return;
if(nStart < 0 )
nStart = 0;
m_iGalleryCurrentPage = nCurrentPage;
int nElemIndex = 0;
int beanos = 0;
stringstream ss;
for (int i = nStart; (i < nTotalCount && nElemIndex < m_iVideoCountInOnePage); i++)
{
ZOOM_SDK_NAMESPACE::IUserInfo* pUser = pUserList->GetItem(i);
if(!pUser || pUser == NULL)
continue;
unsigned int nUserID = pUser->GetUserID();
if (NULL == nUserID || NULL == m_pNormalElemGallery[nElemIndex] || pUser->IsInWaitingRoom())
continue;
if (pUser->GetUserNameW() != NULL) {
wstring ws(pUser->GetUserNameW());
string str(ws.begin(), ws.end());
ss << nUserID << " " << str << endl;
beanos++;
}
if (nUserID != m_pNormalElemGallery[nElemIndex]->GetCurrentRenderUserId() && pUser->IsVideoOn())
{
m_pNormalElemGallery[nElemIndex]->Subscribe(nUserID);
nElemIndex++;
}
else if(nUserID == m_pNormalElemGallery[nElemIndex]->GetCurrentRenderUserId() && GalleryView_Subscribe_CurrentPage == nType)
{
nElemIndex++;
}
}
stringstream out;
out << beanos << endl << ss.rdbuf();
myPipe::getInst()->send(UserMapUpdate, out);
if (nElemIndex < (m_iVideoCountInOnePage-1))
{
for (;nElemIndex < m_iVideoCountInOnePage; nElemIndex++)
{
if (NULL == m_pNormalElemGallery[nElemIndex])
continue;
if (0 != m_pNormalElemGallery[nElemIndex]->GetCurrentRenderUserId())
m_pNormalElemGallery[nElemIndex]->Unsubscribe(m_pNormalElemGallery[nElemIndex]->GetCurrentRenderUserId());
}
}
}
And here I modified this function to send data based on what users are diplayed to gather further data.
void CCustomizeUIVideoMgr::ShowGalleryViewVideo(GalleryViewSubscribeType nType)
{
//DestroyGalleryViewVideo();
DestroyNonVideoUsers();
CreateGalleryViewVideo();
ReSubscribeNormalUser(nType);
int nElementHight = (m_rcGalleryView.bottom-m_rcGalleryView.top) / 3;
int nElementWid = (m_rcGalleryView.right - m_rcGalleryView.left) / 3;
int iShowed = 0;
stringstream pack;
for (int i = 0; i < m_iVideoCountInOnePage; i++)
{
ZOOM_SDK_NAMESPACE::INormalVideoRenderElement* pElementNormal = m_pNormalElemGallery[i];
if (pElementNormal)
{
RECT element_rc_ = m_rcGalleryView;
element_rc_.top = (iShowed % 3) * nElementHight;
element_rc_.bottom = nElementHight + element_rc_.top;
element_rc_.left = (iShowed / 3) * nElementWid;
element_rc_.right = nElementWid + element_rc_.left;
pElementNormal->SetPos(element_rc_);
if (pElementNormal->GetCurrentRenderUserId() > 0)
{
m_customUIVideoFlow.ShowGalleryViewVideo(pElementNormal, element_rc_);
iShowed++;
m_bIsGalleryViewShown = true;
pack << pElementNormal->GetCurrentRenderUserId() << endl;
}
else
{
m_customUIVideoFlow.HideGalleryViewVideo(pElementNormal);
}
}
}
stringstream out;
out << iShowed << endl << pack.rdbuf();
myPipe::getInst()->send(DisplayArrayUpdate, out);
}
FYI the myPipe::getInst()->send(const stringstream& ss) function DOES run in the main thread and while I am doing some multithreading for seperate tasks occasionally, I am not involving them in any zoom sdk dealings whatsoever.
This error occurs consistently when more than 1 person leaves at the same time, REGARDLESS if their webcam is on or not.