Exception on Message Loop


Hi Community!

First of all… I´m really new on Zoom´s universe, so forgive me if my doubt seems foolish…
I was following the Getting Started tutorial to make a simple console application. But, just as I´ve started I began to have issues… Well… I´ve created those callbacks, and it seems to work well, but as my application continues to run it throws an exception that I’ve been struggling with. It seems that an object is out of context, but I don´t know why… Can anyone help me on this issue?

My code follows in TestZoomVideoSDK_Console

Thank you!

Which Windows Video SDK version?
Video SDK version 1.2.2

Steps to reproduce the behavior:
Execute my code with a valid JWT. The exception will be generated on the message loop…



Device (please complete the following information):

  • Device: [Dell Inspiron ]
  • OS: [Windows 10]

Hi @kadu_cemo, thanks for using our SDK.

Can you please provide the steps to reproduce this crash so that we can investigate further? Also, is this reproducible on v1.2.3 of the SDK?


Hi jon.lieblich!

Thanks for your reply…

Hi @kadu_cemo,

I’m not seeing any issues with the fields you’re setting on sessionContext, but the error you’re seeing is unlikely to be related to these values in particular. Can you provide some additional context around how you’re using the SDK in your project, including how sessionContext is being defined, where you’re setting the IZoomVideoSDKDelegate, calling joinSession, etc.?


Hi Jon,

I´m running just a console application. Follows some code in the main file…

IZoomVideoSDK* m_pVideoSDK;
MyListeners myListeners;
IZoomVideoSDKSession* pSession;
ZoomVideoSDKSessionContext sessionContext;
ZoomVideoSDKInitParams initParams;

int main()

    m_pVideoSDK = CreateZoomVideoSDKObj();    
    initParams.domain = L"https://zoom.us";    
    initParams.audioRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeStack;
    initParams.videoRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeStack;
    initParams.shareRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeStack;    
    initParams.enableIndirectRawdata = false;    
    initParams.enableLog = true;    
    initParams.logFilePrefix = L"prefix";

    ZoomVideoSDKErrors returnVal = m_pVideoSDK->initialize(initParams);
    if (returnVal != ZoomVideoSDKErrors_Success) //Error...   
        return returnVal;      
    cout << "SDK Instance created...\n";

    myListeners = MyListeners(m_pVideoSDK);

    cout << "Listeners created and passed to SDK instance...\n"; //Listeners Criadados e passados para a SDK

    //Session Context configuration
    sessionContext.sessionName = L"Sessao";    
    sessionContext.userName = L"Kadu";
    // JWT for this session.
    sessionContext.token = L"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBfa2V5IjoianlGMDlRZkxHNW83N2N6Zm9HTU4xbmxtTzQyYVRqN0xTNkFuIiwidmVyc2lvbiI6MSwicm9sZV90eXBlIjoxLCJ1c2VyX2lkZW50aXR5IjoiS2FkdSIsImlhdCI6MTY0ODY2MzU5NywiZXhwIjoxNjQ4ODM2Mzk3LCJ0cGMiOiJTZXNzYW8ifQ.-VKI5KpdRQSWEfjbxgcaP-RL0w2lVn3KrGRDN6mHnhY";
    // Video and audio options.

    sessionContext.videoOption.localVideoOn = true;
    sessionContext.audioOption.connect = true;
    sessionContext.audioOption.mute = false;

    pSession = m_pVideoSDK->joinSession(sessionContext);

    if (!pSession)
        CString cstrInfo;
        cstrInfo.Format(_T("Failed to join session"));

        CString cstrInfo;
        cstrInfo.Format(_T("Joined session successfully."));

    //Message Loop...
    bool bRet = false;
    MSG msg;
    while ((bRet = GetMessage(&msg, nullptr, 0, 0)) != 0)
        if (bRet == -1)
            // handle the error and possibly exit

As you can see everything was setup in the main function…
But now I have an update… When I commented out

myListeners = MyListeners(m_pVideoSDK);

The error stops throwing… Maybe I´m doing something wrong setting up my listener object…

Thank you for your reply!


As I´ve invetigated until here… The error is really happening inside my listener. Actually it is happening in the callback onUserVideoStatusChanged in the commented statement in the following code:

void MyListeners::onUserVideoStatusChanged(IZoomVideoSDKVideoHelper* pVideoHelper, IVideoSDKVector<IZoomVideoSDKUser*>* userList)
    CString strInfo;
    IZoomVideoSDKUser* pUser;
    int count = userList->GetCount();

    for (int i = 0; i < count; i++)
        pUser = userList->GetItem(i);
        //strInfo.Format(_T("A user's video status changed: userid=%s, name=%s, status=%s"), pUser->getUserName(), pUser->getVideoStatus());

I still don´t know why this code line is crashing my app… But I´m really close to find out.
This code was actually copied from the getting started tutorial, so I hope this can help someone in future.

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