aseprite / aseprite

Animated sprite editor & pixel art tool (Windows, macOS, Linux)
https://www.aseprite.org
27.74k stars 5.12k forks source link

Crash when pasting from clipboard [X11] #2382

Open buckle2000 opened 4 years ago

buckle2000 commented 4 years ago

When I try to paste an image from Firefox to Asesprite, it works. The clipboard content looks like this:

> xclip -out -selection clipboard -t TARGETS
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlinfo
text/_moz_htmlcontext
image/png
image/bmp
image/x-bmp
image/x-MS-bmp
image/x-icon
image/x-ico
image/x-win-bitmap
image/vnd.microsoft.icon
application/ico
image/ico
image/icon
text/ico
image/jpeg
image/tiff

When I try to paste an image from clipboard to Aseprite (saved with xfce4-screenshooter directly to clipboard), it crashes instantly. The clipboard content looks like this:

> xclip -out -selection clipboard -t TARGETS
TARGETS
MULTIPLE
image/tiff
image/jpeg
image/x-MS-bmp
image/x-bmp
image/bmp
image/png
SAVE_TARGETS
TIMESTAMP

The crash:

> aseprite --debug
corrupted size vs. prev_size while consolidating
fish: “aseprite --debug” terminated by signal SIGABRT (Abort)

End of Aseprite-v1.2.18-dev-DebugOutput.txt (only relevent part):

CTXT: Command NewFile executed successfully
CTXT: Executing command Paste

Aseprite-v1.2.18-dev-DebugOutput.txt

There is nothing indicating what's wrong.

If I were to guess why, this is because Aseprite can't decode tiff image, but it tries to anyway because image/tiff starts with image/. This is a bug when handling image in clipboard.

The image/tiff atom from Firefox has no data (NONE) (probably for legacy reasons), and is the last. The image/tiff from the screenshot tool is a tiff image, and is the first image/* atom in clipboard.

Aseprite and System version

buckle2000 commented 4 years ago

Where can I find crash logs? It's not in Edit -> Preferences.

iacs commented 11 months ago

Hi. version 1.2.40 still suffers from this. Any progress on a fix?

ChaminLee commented 6 months ago

me too. version 1.3 still suffers from this issue too.

when i use copy/paste after using lasso tool, it makes crash