Floating point exception(core dumped) when running wrapper script
misterhackerman opened this issue · 2 comments
misterhackerman commented
This is lfub file:
#!/bin/sh
# This is a wrapper script for lf that allows it to create image previews with
# ueberzug. This works in concert with the lf configuration file and the
# lf-cleaner script.
set -e
UB_PID=0
UB_SOCKET=""
UEBERZUG_TMP_DIR="/tmp"
cleanup() {
exec 3>&-
ueberzugpp cmd -s "$ub_socket" -a exit
}
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
lf "$@"
else
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
UB_PID=$(cat "$UB_PID_FILE")
rm "$UB_PID_FILE"
UB_SOCKET="$UEBERZUG_TMP_DIR/ueberzugpp-${UB_PID}.socket"
export UB_PID UB_SOCKET
trap cleanup HUP INT QUIT TERM EXIT
lf "$@" 3>&-
fi
when i first boot the computer. it works successfully, after i close lfub, and then exit the terminal and start a new terminal and execute lfub I get this:
/home/anonymous/.local/bin/lfub: line 30: 26939 Floating point exception(core dumped) ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
/tmp λ export SPDLOG_LEVEL=debug
/tmp λ lfub
/home/anonymous/.local/bin/lfub: line 30: 27776 Floating point exception(core dumped) ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
/tmp λ cat ueberzugpp-anonymous.log
_ _ _
| | | | | | _ _
| | | | ___| |__ ___ _ __ _____ _ __ _ _| |_ _| |_
| | | |/ _ \ '_ \ / _ \ '__|_ / | | |/ _` |_ _|_ _|
| |_| | __/ |_) | __/ | / /| |_| | (_| | |_| |_|
\___/ \___|_.__/ \___|_| /___|\__,_|\__, |
__/ |
|___/ v2.9.4
[2024-05-07 14:11:15.715] [terminal] [info] TERM = xterm-256color
[2024-05-07 14:11:15.715] [terminal] [info] PTY = /dev/pts/0
[2024-05-07 14:11:15.715] [terminal] [debug] ioctl sizes: COLS=0 ROWS=0 XPIXEL=0 YPIXEL=0
[2024-05-07 14:11:15.715] [terminal] [debug] iterm2 is not supported
[2024-05-07 14:11:15.715] [terminal] [debug] ESC sizes XPIXEL=948 YPIXEL=1026
[2024-05-07 14:11:15.816] [terminal] [debug] sixel is not supported
[2024-05-07 14:11:15.816] [terminal] [debug] kitty is not supported
[2024-05-07 14:11:15.816] [terminal] [debug] X11 is supported
[2024-05-07 14:11:15.816] [terminal] [debug] Using fallback X11 window id 20971523
[2024-05-07 14:11:15.816] [terminal] [debug] X11 sizes: XPIXEL=951 YPIXEL=1046
[2024-05-07 14:11:15.816] [terminal] [debug] Wayland is not supported
I don't know if i should include the coredump.
the issue is resolved by quitting dwm and starting again, i use startx. but then recreated by what I've provided earlier.
I use alacritty, dwm, arch linux.
misterhackerman commented
I could also reproduce it like this:
startx
launch alacritty
run ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "file1"
close alacritty
launch alacritty
run ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "file1"
misterhackerman commented
Sorry it's a typo in the script $ub_socket instead of $UB_SOCKET.