clementgallet / libTAS

GNU/Linux software to (hopefully) give TAS tools to games
GNU General Public License v3.0
476 stars 56 forks source link

Fix xcb deadlock on loading a state #612

Closed CasualPokePlayer closed 1 week ago

CasualPokePlayer commented 2 weeks ago

I don't know why this actually fixes it. It seems like some sort of bug in Xlib possibly, doing XSync here instead of the xcb method ends up mucking the xcb numbers in a way which results in future xcb usages deadlocking (and so does other future Xlib calls?). If the xcb sync is done manually, the numbers work out just fine and Xlib interacting with it afterwards (via XSync or otherwise) also works out fine. Doesn't make much sense...

(For debugging, see p x11::gameConnections[0]->out.request_written and p x11::gameConnections[0]->in.request_read with Ruffle for seeing the odd numbers)