Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"invalid width, height, or strid (0x24, 0)" error when calling draw on FallbackFrame #446

Open
tmccombs opened this issue Apr 3, 2024 · 0 comments

Comments

@tmccombs
Copy link

tmccombs commented Apr 3, 2024

When I call FallbackFrame::draw I get this error in the title.

More context from the wayland debug output:

[4029484.720] xdg_surface@20.configure(11489)
[4029486.062]  -> xdg_surface@20.ack_configure(11489)
[4029486.230]  -> xdg_toplevel@21.set_title("zsh")
[4029486.252]  -> wl_shm_pool@22.create_buffer(new id wl_buffer@38, 0, 0, 24, 0, 0)
[4029486.268]  -> wl_surface@23.set_buffer_scale(1)
[4029486.272]  -> wl_subsurface@24.set_sync()
[4029486.277]  -> wl_subsurface@24.set_position(0, -24)
[4029486.282]  -> wl_surface@23.attach(wl_buffer@38, 0, 0)
[4029486.287]  -> wl_surface@23.damage_buffer(0, 0, 2147483647, 2147483647)
[4029486.290]  -> wl_surface@23.commit()
[4029486.296]  -> wl_shm_pool@22.create_buffer(new id wl_buffer@40, 0, 0, 4, 0, 0)
[4029486.301]  -> wl_surface@25.set_buffer_scale(1)
[4029486.304]  -> wl_subsurface@26.set_sync()
[4029486.307]  -> wl_subsurface@26.set_position(-4, -28)
[4029486.311]  -> wl_surface@25.attach(wl_buffer@40, 0, 0)
[4029486.315]  -> wl_surface@25.damage_buffer(0, 0, 2147483647, 2147483647)
[4029486.318]  -> wl_surface@25.commit()
[4029486.322]  -> wl_shm_pool@22.create_buffer(new id wl_buffer@41, 0, 4, 0, 16, 0)
[4029486.327]  -> wl_surface@27.set_buffer_scale(1)
[4029486.330]  -> wl_subsurface@28.set_sync()
[4029486.333]  -> wl_subsurface@28.set_position(0, -24)
[4029486.337]  -> wl_surface@27.attach(wl_buffer@41, 0, 0)
[4029486.340]  -> wl_surface@27.damage_buffer(0, 0, 2147483647, 2147483647)
[4029486.343]  -> wl_surface@27.commit()
[4029486.347]  -> wl_shm_pool@22.create_buffer(new id wl_buffer@42, 0, 0, 4, 0, 0)
[4029486.352]  -> wl_surface@29.set_buffer_scale(1)
[4029486.355]  -> wl_subsurface@30.set_sync()
[4029486.358]  -> wl_subsurface@30.set_position(-4, 0)
[4029486.361]  -> wl_surface@29.attach(wl_buffer@42, 0, 0)
[4029486.365]  -> wl_surface@29.damage_buffer(0, 0, 2147483647, 2147483647)
[4029486.367]  -> wl_surface@29.commit()
[4029486.372]  -> wl_shm_pool@22.create_buffer(new id wl_buffer@43, 0, 4, 0, 16, 0)
[4029486.376]  -> wl_surface@31.set_buffer_scale(1)
[4029486.379]  -> wl_subsurface@32.set_sync()
[4029486.382]  -> wl_subsurface@32.set_position(-4, -24)
[4029486.392]  -> wl_surface@31.attach(wl_buffer@43, 0, 0)
[4029486.396]  -> wl_surface@31.damage_buffer(0, 0, 2147483647, 2147483647)
[4029486.399]  -> wl_surface@31.commit()
[4029486.467] wl_display@1.error(wl_shm_pool@22, 1, "invalid width, height or stride (0x24, 0)")
wl_shm_pool@22: error 1: invalid width, height or stride (0x24, 0)
Protocol error 1 on object wl_shm_pool@22: 
00:00:22.569  ERROR  wezterm_gui > running message loop: Protocol error 1 on object wl_shm_pool@22: ; terminating

Maybe this is user error, and I there is some step I am missing in setting up the client side decorations (which by the way is remarkably complicated to do). But it seems like the library should avoid creating a buffer with invalid parameters.

I think it should either use a minimum size of 1 for the buffers, avoid drawing altogether if the widht and height are zero.

See wez/wezterm#5044

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

No branches or pull requests

1 participant