CefInitialize crash

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefInitialize crash

Postby fasecero » Mon May 12, 2014 3:01 pm

Hi, cefclient sample runs OK, but my first attempt to start a new project crash at CefInitialize.

This is all I wrote, when I run the following the application crash.

What else do I have to implement to get a minimal working code? I'm using CEF3 v. 3.1650.1562

Code: Select all
class ChromeApp : public CefApp {
 public:

  virtual void OnBeforeCommandLineProcessing(
      const CefString& process_type,
      CefRefPtr<CefCommandLine> command_line) {
        ;
  }

  virtual void OnRegisterCustomSchemes(
      CefRefPtr<CefSchemeRegistrar> registrar) {
        ;
  }

  virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() {
    return NULL;
  }


  virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() {
    return NULL;
  }

  virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() {
    return NULL;
  }

private:

   IMPLEMENT_REFCOUNTING(ChromeApp);
};



CefRefPtr<ChromeApp> app;

CEF_API int CefInit(char *logpath)
{
   app = new ChromeApp;

   CefMainArgs main_args(GetModuleHandle(0));

   // Populate this structure to customize CEF behavior.
   CefSettings settings;

   // Initialize CEF in the main process.
   return CefInitialize(main_args, settings, app.get());   <---- CRASH HERE
}

fasecero
Mentor
 
Posts: 60
Joined: Mon May 12, 2014 2:53 pm

Re: CefInitialize crash

Postby magreenblatt » Mon May 12, 2014 3:56 pm

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefInitialize crash

Postby fasecero » Tue May 13, 2014 1:59 pm

I'm following that link for now, after that I will check cefclient with more knowledge.

Anyway, my code was crashing because I forgot to copy the locates folder to my application's directory.

Thank you for the assistance.
fasecero
Mentor
 
Posts: 60
Joined: Mon May 12, 2014 2:53 pm

Re: CefInitialize crash

Postby michaeladamkatz » Mon Mar 19, 2018 2:43 am

fasecero, thanks for mentioning about the missing locales folder. I was having a similar crash and you gave me the clue to look for path problems.
michaeladamkatz
Mentor
 
Posts: 50
Joined: Wed Jan 09, 2013 5:10 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 100 guests