i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
920 stars 404 forks source link

Trying to read (valid) png image from stdin causes "out of memory" #284

Closed SoptikHa2 closed 4 years ago

SoptikHa2 commented 4 years ago

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Other (Please describe in detail)

Current Behavior

When the image is read from /dev/stdin or /proc/self/fd/0, an "out of memory" error is displayed every time.

Expected Behavior

The image is read from stdin successfully.

Reproduction Instructions

I tried to take an image, resize it, and send it to i3lock:

convert -resize $(xrandr -q | grep -Eo '[0-9]+x[0-9]+' -m 1 | cut -dx -f1) ~/archlinux-dotfiles/lockscreen.png - | i3lock -i /dev/stdin -ue
Could not load image "/dev/stdin": out of memory
convert -resize $(xrandr -q | grep -Eo '[0-9]+x[0-9]+' -m 1 | cut -dx -f1) ~/archlinux-dotfiles/lockscreen.png - | i3lock -i /proc/self/fd/0 -ue
Could not load image "/proc/self/fd/0": out of memory

Writing it to tmp and then reading it works like expected:

convert -resize $(xrandr -q | grep -Eo '[0-9]+x[0-9]+' -m 1 | cut -dx -f1) ~/archlinux-dotfiles/lockscreen.png /tmp/img.png && i3lock -i /tmp/img.png -ue

The image I used is here.

Environment

Output of i3lock --version:

i3lock version: version 2.12
stapelberg commented 4 years ago

This is a duplicate of https://github.com/i3/i3lock/issues/227