majestrate / wterm

st fork for wayland
MIT License
159 stars 17 forks source link

segmentation fault on sway #17

Open ThePiGrepper opened 5 years ago

ThePiGrepper commented 5 years ago

I compiled wterm on Arch/sway. After running it, a segmentation fault occurs. Here's the error in gdb:

Program received signal SIGSEGV, Segmentation fault. 0x0041223c in wld_set_target_buffer (renderer=0x0, buffer=0x444fe0) at renderer.c:85 85 if (!renderer->impl->set_target(renderer, (struct buffer *) buffer))

Apparently it happens when calling wld_set_target_buffer(). Do you have any idea what could it be?

majestrate commented 5 years ago

what version of sway is being used?

ThePiGrepper commented 5 years ago

1.1-rc1-51-gf5d1c272 linked to latest(almost) wlroots I think.

ThePiGrepper commented 5 years ago

After further inspection, I saw that 'wld.renderer = wld_create_renderer(wld.ctx)' at wlinit() is returning a NULL pointer and that's the reason behind the segfault. So the question would be why is the renderer not being created.

ThePiGrepper commented 5 years ago

Ok, I just got it to work, by forcing shm interface: 'WLD_WAYLAND_INTERFACE=shm ./wterm'. However, this should work automatically, so probably it's a bug in wld itself.