Commit Graph

1 Commits

Author SHA1 Message Date
Ivan Mironov
ff1f7b4904 Cherry-pick fix for clipboard related crash from v5.15.0
Crash can be reproduced easily with telegram-desktop from RPM Fusion
and wl-clipboard:

1. Run `dd if=/dev/zero bs=1024 count=10240 | wl-copy -f -o -t image/bmp`.
2. Try to paste into any Telegram chat.

Resulting backtrace contains a lot of lines like following:

	...
	#1897 0x00007fffe1da600c in QtWaylandClient::QWaylandMimeData::readData (this=0x53f3aa0, fd=31, data=...) at qwaylanddataoffer.cpp:186
	#1898 0x00007fffe1da600c in QtWaylandClient::QWaylandMimeData::readData (this=0x53f3aa0, fd=31, data=...) at qwaylanddataoffer.cpp:186
	#1899 0x00007fffe1da600c in QtWaylandClient::QWaylandMimeData::readData (this=0x53f3aa0, fd=31, data=...) at qwaylanddataoffer.cpp:186
	...

Note that this is not 100% reproducible when copying large images from
other applications (like Firefox). This is because other applications
are sometimes not fast enough for one-second timeout hadcoded in
QtWayland.
2020-04-30 04:40:29 +05:00