Build Error in CefRunMessageLoop Function

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.

Re: Build Error in CefRunMessageLoop Function

Postby Voltageist » Wed Aug 05, 2020 1:11 pm

magreenblatt wrote:What, specifically, is the problem? Is your application terminating unexpectedly? Or is it just the crash on shutdown?

Your stack trace is from this error:
[0731/171621.311325:FATAL:context.cc(58)] Check failed: !g_context. CefShutdown was not called


Okay, let me try to set up some break points to get a stack trace at the correct error.

Because I'm actually getting an error a little before that CefShutdown error, during my call to CefRunMessageLoop:
Code: Select all
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  42 (X_SetInputFocus)
  Serial number of failed request:  267
  Current serial number in output stream:  269
Voltageist
Techie
 
Posts: 16
Joined: Fri Jul 31, 2020 9:37 am

Re: Build Error in CefRunMessageLoop Function

Postby magreenblatt » Wed Aug 05, 2020 1:21 pm

Voltageist wrote:Because I'm actually getting an error a little before that CefShutdown error, during my call to CefRunMessageLoop:
Code: Select all
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  42 (X_SetInputFocus)
  Serial number of failed request:  267
  Current serial number in output stream:  269

Is there some visible behavioral symptom of this error which makes you think it's a problem?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Build Error in CefRunMessageLoop Function

Postby Voltageist » Wed Aug 05, 2020 1:28 pm

magreenblatt wrote:
Voltageist wrote:Because I'm actually getting an error a little before that CefShutdown error, during my call to CefRunMessageLoop:
Code: Select all
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  42 (X_SetInputFocus)
  Serial number of failed request:  267
  Current serial number in output stream:  269

Is there some visible behavioral symptom of this error which makes you think it's a problem?


So my code is basically a conversion of cefsimple's .cc files, but as .cpp files. When I run CEF's cefsimple binary I'm able to create a browser instance in a window that leads to google.com as a result. When I run my C++ version of this, a window spawns for a brief second but then seems to crash immediately. This window never actually leads to a browser instance or website, but is instead a white screen. I believe I'm very close to solving this, but something's failing right at the end.
Voltageist
Techie
 
Posts: 16
Joined: Fri Jul 31, 2020 9:37 am

Re: Build Error in CefRunMessageLoop Function

Postby magreenblatt » Wed Aug 05, 2020 2:00 pm

It looks like you're not installing the X error handlers which keep the application from crashing on X error.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Build Error in CefRunMessageLoop Function

Postby Voltageist » Wed Aug 05, 2020 4:31 pm

magreenblatt wrote:It looks like you're not installing the X error handlers which keep the application from crashing on X error.


This seemed to resolve the issue (I also needed to add -lX11 to my gcc command). I also added the check for the CefExecuteProcess function. Thanks so much!
Voltageist
Techie
 
Posts: 16
Joined: Fri Jul 31, 2020 9:37 am

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 81 guests