xcb_image_get returns NULL if called right after the connection is established. flames.c from xcb-demo(git version) is a perfect test case. Return value of the xcb_image_get is not being checked and there is a segfailt at the next line. Adding sleep(1) before calling xcb_image_get in flame_draw_flame function solves the problem. It looks like a timing problem, it depends on the slowness of the machine. There is no problem on a 200mhz arm machine and when it runs in gdb.
I've found minimal testcase which triggers the problem. Attached. When any argument is passed to it, it sleeps for a second before obtaining image. [mag@frontier:~/openinkpot/efl/xcb]% ./test1 (nil) [mag@frontier:~/openinkpot/efl/xcb]% ./test1 test 0x804c330 [mag@frontier:~/openinkpot/efl/xcb]%
Created attachment 17663 [details] testcase
I think this is not a bug. You can't do a get_image on an unmapped window; the server refuses. You're supposed to wait for the mapping event before you try to work with the window. In practice, it suffices to ensure that the MapWindow request completes: using xcb_map_window_checked() instead of the xcb_flush() that was there is sufficient to fix the problem.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.