flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.22k stars 1.55k forks source link

Screenshots fail when including desktop wallpaper #3337

Open sandmuel opened 10 months ago

sandmuel commented 10 months ago

Flameshot Version

Flameshot v12.1.0 (-) Compiled with Qt 5.15.10 linux: 6.5.3-1-default opensuse-tumbleweed: 20230915

Installation Type

Flatpak from Flathub

Operating System type and version

openSUSE (Tumbleweed)

Description

any screenshot that includes the desktop wallpaper will result in a corrupted screenshot (have tried with: png, jpeg)

Steps to reproduce

run flameshot gui

Screenshots or screen recordings

example of broken screenshot (seems github just ignores the corrupted part, but many things (such as discord) don't): image Here's a screenshot that does not include the wallpaper: image

System Information

Fogapod commented 4 months ago

I've got same bug on current flameshot-git on arch linux with sway and wayland. It often (but not always) produces corrupted partial pngs, at least when copied to clipboard. Seems like the bigger the screenshot is the higher chance of it being corrupted/larger chunk is missing.

I don't see a correlation to wallpaper. It seems random and depends on screenshot size. I cannot reproduce this by saving file. Flameshot clipboard has often been broken for me even since xorg/i3.

Github won't let me paste corrupted image so i cannot attach it but it looks the same: a strip of image of random width on top and the rest is corrupted.

This looks similar to https://github.com/flameshot-org/flameshot/issues/3329

mmahmoudian commented 4 months ago

@sandmuel are you sure you have installed via Flatpak? Because you cannot run flameshot gui if you have installed it via Flatpak

@Fogapod interesting. Would you please provide:

  1. The flameshot --version
  2. Zip the corrupted image and attach that
Fogapod commented 4 months ago

@mmahmoudian

Flameshot v12.1.0 (3d21e496)
Compiled with Qt 5.15.12

I extracted image with wl-paste > broken.png

Attached directly:

broken

Zip:

broken.zip

I checked multiple apps using clipboard paste and extracted file. Not sure this file itself is corrupted since all apps that were broken accept it from filesystem:

app clipboard broken.png
discord
element desktop
telegram
github website ❌ - does not let me paste
gimp
sxiv -

Where:

There could be a problem with wl-clipboard (although never noticed problems with other apps. For example, grim - | wl-copy works every time, capturing full screen, never corrupted)

Another explanation could be apps handling clipboard and filesystem differently

Fogapod commented 4 months ago

I managed to get the corrupted image by uploading and downloading from matrix:

broken2.zip broken2

This breaks all software same way as if i pasted it from clipboard

sandmuel commented 1 month ago

@sandmuel are you sure you have installed via Flatpak? Because you cannot run flameshot gui if you have installed it via Flatpak

@Fogapod interesting. Would you please provide:

  1. The flameshot --version
  2. Zip the corrupted image and attach that

Oops :sweat_smile:, I had completely missed the notification, to answer the question I do believe both the flatpak and the native package result in the same issue.