GNOME Bugzilla – Bug 788604
x11: Applications abort due to _GTK_EDGE_CONSTRAINTS
Last modified: 2017-10-17 14:32:30 UTC
Since 3.22.24 we started seeing one of our regression tests ("software-properties") failing: Gdk-Message: setup.py: Fatal IO error 11 (Resource temporarily unavailable) on X server :99. I bisected gtk3 and it told me that c415bef5deb533f3ef3e4b31a33821ef2f42ebda was the commit that made this test start failing. Some grubbing around showed me that it was the 'gdk_x11_get_xatom_by_name_for_display (display, "_GTK_EDGE_CONSTRAINTS")' call that was causing the error. I wondered why this wasn't happening for the previous calls to that function. Turns out that it's because those values are precached. My knowledge in this area is rather sketchy, but is it OK to add _GTK_EDGE_CONSTRAINTS there too?
Created attachment 361049 [details] [review] x11: Precache _GTK_EDGE_CONSTRAINTS Since c415bef5deb533f3ef3e4b31a33821ef2f42ebda we always check _GTK_EDGE_CONSTRAINTS. This can lead to aborting applications in some circumstances.
precaching should not be necessary for this to work correctly. It would be interesting to know more exactly what is going wrong there
Alright, can you give me some hints for what to look at please?
I saw bug #788666, which seemed a bit similar. Maybe comment #25 there is describing this bug. Trapping the error (gdk_x11_display_error_trap_push / gdk_x11_display_error_trap_pop_ignored) around the call also works around the problem. Is that more correct? Or otherwise, is there a way to avoid this call or the error?
(In reply to Iain Lane from comment #4) > Trapping the error (gdk_x11_display_error_trap_push / > gdk_x11_display_error_trap_pop_ignored) around the call also works around > the problem. Sorry, that was false, I'd messed up how I was running the tests. I also tried with gdk_x11_screen_supports_net_wm_hint and that doesn't work either.
OK, since I got no replies here I've changed the software-properties testsuite to avoid this. It would be good to know what precaching is for though, and when it's appropriate (i.e. why it wasn't right here).