Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when repeatedly opening/closing GUI
Cairo keeps a global cache list of connections, but since the reference count of the device never reaches 0, the devices are never removed from this cache list. The crash happens when a new xcb_connection is made, and the new pointer happens to be the same as an existing pointer in this cache list, then the wrong cairo_xcb_connection is returned. Then no screen can be found, since the root is not the same for that old xcb_connection and the new one. Thus we end up at ASSERT_NOT_REACHED in _get_screen_index(), in cairo-xcb-screen.c Note that there is some resource leakage somewhere, since the reference count of the cairo devices should reach 0 at some point, but never do. Fixes steinbergmedia#334
- Loading branch information