-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
panic: runtime error: slice bounds out of range #68
Comments
wow haven't seen that one before. how big is your database?
looks like you might be running into etcd-io/bbolt#576 |
Whaaaat?
I have only installed it last week! No idea what is inside there! |
I renamed the file to db.off and cliphist started working again. Still worth investigating what really made it grew that much, and maybe provide a better hint for future users (pretty much what they discuss in the link above) |
wow that's big. are you storing videos as well as images in there? couldn't be just text |
ill track the upstream issues for the panic. if you see the db growing again, you could try |
my 12 week old db is 54 mb for reference 😁 |
I might have copied an occasional image or two, but not videos... Hmmm, I could also have done a couple of copy and paste on files to another folder with pcmanfm. Are these copied in the db too...? That's weird! It would be interesting if you could whip up a script that tries to print the contents of the db (although I believe the underlying db library ALSO fails to read in there...) |
Well in regards to |
hmm im not sure how pcmanfm interacts with the clipboard, never tried it
yeah unfortunately it looks like the database is unusable (maybe corrupt?) until upstream is fixed also i just added a check to |
I did some tests now with pcmanfm. After copying a binary file, all I see in the clipboard history if the filename only as |
i don't wanna take 7GB of potentially very personal information 😁 i would just delete it. and it probably wont be an issue going forward with the 5MB check |
Ok will do. Haven't checked, but how big is an image copy from a large 4K monitor? I am only running two monitors of 1920x1080 and another at 2560x1080, but I would hate to lose an image copy from a full screen resolution... Maybe 5MB is too conservative? some test might be in order... |
ah i see. can you take a screenshot to clipboard, then |
Well it was slightly more involving :)
The copied image was pulled from grim and slurp and it is very close to the max resolution of my 2560x1080 monitor... And while I have you here, may I abuse this thread to ask if you are aware of any scripts/utils that might allow me to preview what images I might have copied in cliphist...? |
okay 264086 bytes is 264.09 kB so that should be fine
i believe there is something like that in #61 from @chmouel 👀 |
yes! let me clean this up and submit a PR! |
we also have an rofi image script from @Sonico98 too 👍 |
Tried that script but it failed on me! Opened a separate issue #71 |
@chmouel I believe your gist has a typo somewhere no...? I get a:
Is there any updated version somewhere... :) |
@stratosgear hey sorry I had some issues to run cliphist to capture the image (I am not sure what is the issue, it doesn't capture when running as exec in sway but it does when I run cliphist from the command line) This script works fine with me, their may be some problem with quoting unfortunately, i don't think there is much way to avoid quoting issues while using shell script: #!/usr/bin/env bash
TMP=$(mktemp /tmp/.mm.XXXXXX)
clean() {
ueberzugpp cmd -s "$SOCKET" -a exit
rm -f $TMP
pkill -f kitty.*fzcliphist
}
trap clean EXIT
query=
[[ -n ${1-""} ]] && query="--query=$*"
case "$(uname -a)" in
*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
*) UEBERZUG_TMP_DIR="/tmp" ;;
esac
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file "$UB_PID_FILE"
UB_PID=$(cat "$UB_PID_FILE")
export SOCKET="$UEBERZUG_TMP_DIR"/ueberzugpp-"$UB_PID".socket
export X=$(($(tput cols) / 2 + 1))
# --max-width $FZF_PREVIEW_COLUMNS --max-height $FZF_PREVIEW_LINES
# if FZF_PREVIEW_COLUMNS exists, use it, otherwise use tput cols
[ -z "$FZF_PREVIEW_COLUMNS" ] && max_width=$(($(tput cols) - 2)) || max_width=$FZF_PREVIEW_COLUMNS
[ -z "$FZF_PREVIEW_LINES" ] && max_height=$(($(tput lines) - 2)) || max_height=$FZF_PREVIEW_LINES
rm -f /tmp/.copied
# run fzf with preview
output=$(cliphist list | fzf ${query} --with-nth=2.. --reverse --preview="echo {}|cliphist decode > $TMP;[[ {} == *'binary data image/png' ]] && { ueberzugpp cmd -s $SOCKET -i fzfpreview -a add -x $X -y 1 --max-width $max_width --max-height $max_height -f $TMP ;} || bat ${TMP} ")
[[ -n "$output" ]] && {
echo "$output" | cliphist decode | wl-copy -n
touch /tmp/.copied
}
(ah yeah another problem which i didn't see before but just appeared for me on kitty latest version with ueberzugpp is that it doesn't clear the screen after showing the image) |
I suddenly start getting a:
that I do not know how to debug.
I thought some items in the history might trigger it, but trying to wipe all fails again:
So I am stuck.
Running under latest version of hyprland on latest arch. Not sure what other dbug info you might need.
Thanks!
The text was updated successfully, but these errors were encountered: