network services crashed in a MFC dialog based application

Built a cool app using CEF that you'd like to share with the community? Talk about it here.

network services crashed in a MFC dialog based application

Postby jokercc » Wed Dec 30, 2020 3:17 am

It doesn't work when using multi-process mode.How can I fix this?
DEBUG MESSAGE: ERROR:Network service crashed, restarting service.
Code: Select all
// CefDemo.cpp
BOOL CCefDemoApp::InitInstance()
{
    if (InitCef() >= 0)
        return FALSE;
    CWinApp::InitInstance();
    // code created by wizard
    // ...
    UninitCef();
    return FALSE;
}

int CCefDemoApp::InitCef()
{
    CefEnableHighDPISupport();
    void *sandbox_info = nullptr;
    CefMainArgs main_args(AfxGetApp()->m_hInstance);

    CefSettings settings;
    settings.no_sandbox = true;
    settings.multi_threaded_message_loop = true;

    settings.log_severity = LOGSEVERITY_ERROR;

    CefRefPtr<SimpleApp> app(new SimpleApp);
    m_bCefInited = CefInitialize(main_args, settings, app.get(), sandbox_info);
    int exit_code = CefExecuteProcess(main_args, nullptr, sandbox_info);
    if (exit_code >= 0) {
        // The sub-process has completed so return here.
        return exit_code;
    }
    return -1;
}

void CCefDemoApp::UninitCef()
{
    if (m_bCefInited)
        CefShutdown();
}
jokercc
Newbie
 
Posts: 4
Joined: Wed Dec 30, 2020 2:40 am

Re: network services crashed in a MFC dialog based applicati

Postby magreenblatt » Wed Dec 30, 2020 12:06 pm

You probably need to use a separate sub-process executable. See https://bitbucket.org/chromiumembedded/ ... executable
magreenblatt
Site Admin
 
Posts: 10866
Joined: Fri May 29, 2009 6:57 pm


Return to Apps Discussion

Who is online

Users browsing this forum: No registered users and 1 guest