XAllocID causes ID conflict
libX11 stashes away a XID (in display->xcb->next_xid) to be used later. However, when xcb uses up its ID range, it will make a GetXIDRange request to retrieve the free XIDs from the xserver. Because the XID stashed away by libX11 is not actually used, it's considered free by the xserver. Thus, xcb_generate_id() and XAllocID will both return that ID later, causing BadIDChoice.