resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
501 stars 50 forks source link

[Bug] Scrot uses old screencaptures #41

Open teapat opened 4 years ago

teapat commented 4 years ago

A few days ago I used scrot to try to display differences of my tmux configs to my better looking half. Just to see an old screencapture I did before, which I deleted already, was taken purely for test purposes.

Since then I could reproduce the bug somewhat consistent by just taking a few screenshots in a row. Just used for i in 1 2 3; do scrot; echo "$i"; sleep 1; done and got a screenshot I did to test scrot after I reinstalled it an hour ago. (Which also is deleted for the same time).

Tested under i3 and bspwm, through different methods and naming the files and setting the overwrite flag.

(Also tested with st, termite, sxhkd and dmenu)

[Currently using Arch 5.5.6* and Xorg 1.20.7-1]

teapat commented 4 years ago

2020-03-01-233939_1280x800_scrot On the left the console and what you should see (not including the feh), on the right the scrot taken (which was taken before and deleted).

teapat commented 4 years ago

Same problem with any other version of scrot I found so far. Maim works fine.

keysym commented 4 years ago

I wasn't able to reproduce :/

dirdi commented 4 years ago

Was not able to reproduce, either. I suspect this is not a scrot bug, but rather a filesystem issue.

@teapat would you mind to append the following information to your bug report:

ghost commented 3 years ago

Same Here, somethings scrot take an old screenshot and paste it with the new one

daltomi commented 3 years ago

Please, for future reports:

  1. Indicate what already said by @dirdi and also: version of scrot, giblib, imlib2
  2. Try save in another format that is not PNG.

I have not seen problems in scrot or giblib but there is a substantial change between the imlib2 version 1.6 and 1.7 in the implementation of image saving, in the report of errors. I am not claiming that imlib2 has a bug, only that it is a possible clue.

Flow when saving:

scrot -> giblib -> imlib2 -> loaders (dlsym) -> (png.so, jpg.so, etc)

Cheers.

x70b1 commented 3 years ago

I have the same issues. But I think its not a scrot bug. It seems to be even worse. scrot only shows the result of a problem at another place.

Taking screenshots with scrot shows sometimes old screens. But it is not the output file thats the problem here. The root cause seems to be the point when the screen is captured. I have seen that this also happens when I use other things like jitsi via chromium. I want to share my whole screen, but the guy on the other end can only see an old screenshot of my screen. But after that it also works on the other way: scrot can save a screenshot of the point when I started a web screen sharing via jitsi.

So my idea is: A screen capture is cached(?) somewhere and it pops up as soon as I want to capture a new screen. After that some magic happen.

I am not sure to 100% but I strongly assume that I have seen this old screen captures even after I rebooted my laptop.

Arch Linux
xorg-server 
i3-gapps
daltomi commented 3 years ago

Looking for similar problems:

Whenever I click "Take a new screenshot" it somehow takes a screenshot of a screen state long ago, for example how the screen looked 5 seconds ago

Shutter, even Gimp’s screenshot dialog) are having trouble, they all capture garbage – a screen state which is an hour or so old.