On Wed, 5 Mar 2025 21:45:54 -0500 Bill Hayden <hay...@haydentech.com> wrote:
> I am porting a multi-threaded UI toolkit to Weston (layered on top of > toytoolkit), and running into an issue. This UI toolkit expects to be able > to draw from multiple threads, to be specific, from a different thread than > the one that called display_run() -- i.e. not from a > widget_redraw_handler_t function or the like. Hi Bill, the toytoolkit is a toy of a toolkit, not intended for serious use. It is inherently not thread-safe at all. Sorry, pq > > Just a single call to widget_cairo_create() from another thread, even if > nothing is done with the returned context, is enough to trigger a crash. > The crash always manifests the same way: leaf->cairo_surface is NULL in > shm_surface_swap(), resulting in cairo_image_surface_get_width() triggering > a segfault. > > The call stack looks like this: > cairo_image_surface_get_width > shm_surface_swap > surface_flush > window_flush > run_deferred_tasks > <display loop function> > > Any help would be appreciated!
pgp5czaDtb7gV.pgp
Description: OpenPGP digital signature