this isn't a practical issue, but running imv
with no arguments from a tty segfaults on my system.
is the intended behavior to print an error message, like "cannot open display: $" (or should that be the behavior)?
It seems it tries to use the X11 version:
imv-x11: ../imv-v4.4.0/src/x11_window.c:109: imv_window_create: Assertion `window->x_display' failed. Aborted (core dumped)
/* imv.c, starting at line 1207 */ static bool setup_window(struct imv *imv) { imv->window = imv_window_create(imv->initial_width, imv->initial_height, "imv"); if (!imv->window) { imv_log(IMV_ERROR, "Failed to create window\n"); return false; }the callee handles errors, so the immediate fix is replacing these assertions (there's one in
wl_window.c
too) with propogating the error upward.there's several other asserts in
imv_window_create
which also seem like they can fail (and at a quick glance, many other asserts throughout the codebase). this would be fine, if not a little unfriendly for the few users who'd be reading them, if asserts were unconditionally compiled. however, my understanding of assertions in the c standard library is that conditionally compiling them is a fundamental feature.a deeper fix to the issue revealed by this would be to go through every assertion and make sure that it's probably not possible to hit, adding error handling as needed.
Is this caused by a wlroots update? https://github.com/swaywm/sway/issues/7398 suggests that even chromium and mpv are broken on wayland.
Is this caused by a wlroots update? https://github.com/swaywm/sway/issues/7398 suggests that even chromium and mpv are broken on wayland.
This cannot be caused by
wlroots
since the error comes fromimv-x11
notimv-wayland
.When running on a TTY it defaults to
imv-x11
since there's notWAYLAND_DISPLAY
isn't defined:#!/bin/sh if [ -n "${WAYLAND_DISPLAY}" ]; then exec imv-wayland "$@" else exec imv-x11 "$@" fi
Oh, if you mean the whole
assert
thing, then yes. But the root cause of both issues seem to be different.
i submitted a patch for this immediate fix here: https://lists.sr.ht/~exec64/imv-devel/patches/38654