Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Assertion failure in headless backend #2523

Closed
any1 opened this issue Dec 7, 2020 · 3 comments · Fixed by #2524
Closed

Assertion failure in headless backend #2523

any1 opened this issue Dec 7, 2020 · 3 comments · Fixed by #2524

Comments

@any1
Copy link
Contributor

any1 commented Dec 7, 2020

The following assertion fails when mpv is put into fullscreen mode on a headless output:

sway: backend/headless/output.c:94: output_commit: Assertion `output->back_buffer != NULL' failed.

Backtrace:

#0  0x00007fed0dea4615 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7fed0d258940 (LWP 121952))]
(gdb) where
#0  0x00007fed0dea4615 in raise () at /usr/lib/libc.so.6
#1  0x00007fed0de8d862 in abort () at /usr/lib/libc.so.6
#2  0x00007fed0de8d747 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#3  0x00007fed0de9cbf6 in  () at /usr/lib/libc.so.6
#4  0x00007fed0e73b0d6 in output_commit (wlr_output=0x557be1744a30)
    at ../subprojects/wlroots/backend/headless/output.c:94
#5  0x00007fed0e778ed6 in wlr_output_commit (output=0x557be1744a30)
    at ../subprojects/wlroots/types/wlr_output.c:598
#6  0x0000557be0bbc48a in scan_out_fullscreen_view
    (output=0x557be18970f0, view=0x557be1bfe540) at ../sway/desktop/output.c:555
#7  0x0000557be0bbc564 in output_repaint_timer_handler (data=0x557be18970f0)
    at ../sway/desktop/output.c:580
#8  0x0000557be0bbc846 in damage_handle_frame
    (listener=0x557be1897270, user_data=0x557be18972c0) at ../sway/desktop/output.c:671
#9  0x00007fed0e78b9a3 in wlr_signal_emit_safe (signal=0x557be1897320, data=0x557be18972c0)
    at ../subprojects/wlroots/util/signal.c:29
#10 0x00007fed0e772bd8 in output_handle_frame (listener=0x557be18973d0, data=0x557be1744a30)
    at ../subprojects/wlroots/types/wlr_output_damage.c:56
#11 0x00007fed0e78b9a3 in wlr_signal_emit_safe (signal=0x557be1744bb8, data=0x557be1744a30)
    at ../subprojects/wlroots/util/signal.c:29
#12 0x00007fed0e779269 in wlr_output_send_frame (output=0x557be1744a30)
    at ../subprojects/wlroots/types/wlr_output.c:678
#13 0x00007fed0e73b395 in signal_frame (data=0x557be1744a30)
    at ../subprojects/wlroots/backend/headless/output.c:166
#14 0x00007fed0e0bb1dd in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#15 0x00007fed0e0b94e7 in wl_display_run () at /usr/lib/libwayland-server.so.0
#16 0x0000557be0bb7a4e in server_run (server=0x557be0c2f320 <server>) at ../sway/server.c:244
#17 0x0000557be0bb6f4a in main (argc=1, argv=0x7ffcfaa676e8) at ../sway/main.c:412

Steps to reproduce:

  • Run WLR_BACKENDS=headless sway (built from master branch)
  • Run WAYLAND_DISPLAY=wayland-1 wayvnc
  • Connect to the VNC server using some client, e.g. wlvncc
  • Play a video in mpv and put it into fullscreen mode
emersion added a commit to emersion/wlroots that referenced this issue Dec 7, 2020
I was about to add a check to fail instead of crash when the compositor
uses direct scan-out, but with renderer v6 it's so simple to just add
support for direct scan-out, why bother?

Closes: swaywm#2523
@emersion
Copy link
Member

emersion commented Dec 7, 2020

Can you try #2524?

@any1
Copy link
Contributor Author

any1 commented Dec 8, 2020

Yeah, that fixes it.

An unrelated "problem" is that I always get this printed out to the terminal when in full screen. But it was like that before:

[types/wlr_output.c:579] Basic output test failed

I also get this printout whenever there's something new rendered, which (IIRC) only started happening after the v6 update.

[EGL] command: eglGetConfigAttrib, error: EGL_BAD_CONFIG (0x3005), message: "eglGetConfigAttrib"

emersion added a commit that referenced this issue Dec 8, 2020
I was about to add a check to fail instead of crash when the compositor
uses direct scan-out, but with renderer v6 it's so simple to just add
support for direct scan-out, why bother?

Closes: #2523
@emersion
Copy link
Member

emersion commented Dec 8, 2020

Basic output test failed

Hm, I don't get that on AMD. I'm running mpv --hwdec=none --fullscreen whatever. What hw and test client are you using?

eglGetConfigAttrib, error: EGL_BAD_CONFIG (0x3005), message: "eglGetConfigAttrib"

Yeah, wlroots tries to figure out whether there is an alpha channel by reading the EGL config. This is incorrect when a FBO is used, and since #2510 we don't have a config anymore. Opened #2527 to track it, in the meantime it's mostly harmless and it'll just mean you'll get RGBX via screencopy shm instead of RGBA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants