I'm currently running Linux and my project was based in the 2454 branch of CEF and everything was running fine, but I decided to update it directly to 2623 (in the same way I updated from 2272 to 2454). It's worth noting I made some changes to libcef which are essential to my project. However, after successfully merging bitbucket's remote 2623 branch into my 2454-based branch, the call to CefBrowserHost::CreateBrowser() fails with the following message:
- Code: Select all
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 1 (X_CreateWindow)
Serial number of failed request: 131
Current serial number in output stream: 139
Same thing happens with CefBrowserHost::CreateBrowserSync(). I figured this could've been caused by some bad conflict resolution, but I tried to open cefclient to see if the same problem happened, but cefclient worked perfectly. I checked cefclient's CreateBrowser calls and they didn't seem very different from mine. Here's how I'm calling it by the way:
- Code: Select all
// SimpleHandler implements browser-level callbacks.
CefRefPtr<SimpleHandler> handler(new SimpleHandler);
// Information used when creating the native window.
CefWindowInfo window_info;
window_info.SetAsChild(windowId, CefRect(0, 0, size.width(), size.height()));
// Specify CEF browser settings here.
CefBrowserSettings browser_settings;
// Create the first browser window.
CefBrowserHost::CreateBrowser(window_info, handler, "",
browser_settings, nullptr);
windowId is the window ID from the parent window (created by the other process). This code is called when the parent process sends a message to cefsimple containing its ID. Nothing much different from cefclient aside from the IPC part.
I'm now trying to debug the code to see what parameter attributes are invalide (since X's message doesn't tell me). I'm now at the call to XCreateWindow, deep down Chromium's code, and here are the values it's being called with:
- Code: Select all
Window XCreateWindow(
Display* /* display */,
Window /* parent */,
int /* x */, // 0
int /* y */, // 0
unsigned int /* width */, // 800
unsigned int /* height */, // 600
unsigned int /* border_width */, // 0
int /* depth */, // 24
unsigned int /* class */, // InputOutput (1)
Visual* /* visual */, // {
// bits_per_rgb = 8;
// blue_mask = 255;
// c_class = 4;
// ext_data = 0;
// green_mask = 65280;
// map_entries = 256;
// red_mask = 16711680;
// visualid = 35
// }
unsigned long /* valuemask */, // 17
XSetWindowAttributes* /* attributes */ // {
// background_pixel = 0;
// background_pixmap = 0;
// backing_pixel = 0;
// backing_planes = 0;
// backing_store = 0;
// bit_gravity = 1;
// border_pixel = 0;
// border_pixmap = 0;
// colormap = 0;
// cursor = 0;
// do_not_propagate_mask = 0;
// event_mask = 0;
// override_redirect = 0;
// save_under = 0;
// win_gravity = 0;
// }
);
I took a glimpse at the XCreateWindow docs, but all I got was:
XLib Programming Manual: XCreateWindow, XCreateSimpleWindow wrote:For class InputOutput, the visual type and depth must be a combination supported for the screen, or a BadMatch error results.
That's not very descriptive. I'm pretty sure my current setup supports 24 bits, but how should I know the type?
Anyway, that's as far as I got. I have no other clue. I tried called the Sync function, tried creating a parentless window, changing attributes, changing the CefInitialize() call, but nothing solved my problem and I still have no clue of what's causing it. Any help is appreciated.
Thanks in advance.
EDIT: The crash actually happens at a XFlush call in TouchFactory::SetupXI2ForXWindow().