Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910562 - dev-qt/qtgui:5 - drag and drop broken in all qt apps in wayland (sway)
Summary: dev-qt/qtgui:5 - drag and drop broken in all qt apps in wayland (sway)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard: fixed in dev-qt/qtwayland-5.15.10-r2
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2023-07-19 20:16 UTC by Gino McCarty
Modified: 2023-08-15 19:57 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gino McCarty 2023-07-19 20:16:21 UTC
Not sure whats causing this but both qtfm and kde-apps/dolphin
crash if you attempt drag and drop on wayland/sway

Jul 19 13:05:13 greysoap kernel: dolphin[45820]: segfault at 8 ip 00007f269fc44d27 sp 00007fff88db9580 error 4 in libQt5Gui.so.5.15.10[7f269fbca000+455000] likely on CPU 6 (core 2, socket 0)
Jul 19 13:05:13 greysoap kernel: Code: 89 44 24 70 31 c0 83 fe 04 0f 94 c0 83 c8 14 83 fe 01 b9 13 00 00 00 0f 45 c8 80 7f 4c 00 bd 0e 00 00 00 0f 45 e9 48 8b 47 50 <48> 8b 40 08 48 8b 80 a8 00 00 00 48 8b 48 10 48 85 c9 0f 84 21 01

Jul 19 13:14:32 greysoap kernel: qtfm[46904]: segfault at 8 ip 00007f866ca44d27 sp 00007ffd56af8570 error 4 in libQt5Gui.so.5.15.10[7f866c9ca000+455000] likely on CPU 5 (core 1, socket 0)
Jul 19 13:14:32 greysoap kernel: Code: 89 44 24 70 31 c0 83 fe 04 0f 94 c0 83 c8 14 83 fe 01 b9 13 00 00 00 0f 45 c8 80 7f 4c 00 bd 0e 00 00 00 0f 45 e9 48 8b 47 50 <48> 8b 40 08 48 8b 80 a8 00 00 00 48 8b 48 10 48 85 c9 0f 84 21 01



 emerge --info
Portage 3.0.49 (python 3.11.4-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.37-r3, 6.1.38-gentoo.custom x86_64)
=================================================================
System uname: Linux-6.1.38-gentoo.custom-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-glibc2.37
KiB Mem:    16189512 total,   6943420 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Wed, 19 Jul 2023 17:16:56 +0000
Head commit of repository gentoo: fc8cc1684468018b05fc1441578b1a65d9d27cd8

Head commit of repository local: 1598ad3102cb403897ecbe9f6c1b7361ec1812cf

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r3::gentoo
dev-lang/python:           3.11.4::gentoo
dev-lang/rust:             1.70.0::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.47.1::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: yes

local
    location: /var/db/repos/local
    sync-type: git
    sync-uri: ssh://git@github.com/Teknocrat/teknocrat-overlay.git
    masters: gentoo
    priority: 90
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native -O2 -pipe -mtune=native -flto=thin -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -O2 -pipe -mtune=native -flto=thin -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live cgroup clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -W1,-O2 -Wl,--as-needed -Wl,-z,relro,-z,now -pie -unwindlib=libunwind"
LEX="flex"
LINGUAS="en en_US"
MAKEOPTS="-j7"
NM="llvm-nm"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
SHELL="/bin/bash"
USE="acl amd64 bash-completion bluetooth bzip2 caps cli crypt cups dbus dri egl elogind ffmpeg flac fortran gdbm gif gmp gnome-keyring iconv icu ipv6 jpeg keyring libtirpc mtp multilib ncurses netlink nls nptl ogg opengl openmp pam pcre png policykit pulseaudio readline seccomp split-usr ssl svg test-rust threads tiff truetype udev unicode usb v4l vaapi vim-syntax wayland xattr zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 sse4a avx avx2 aes fma 3dnowprefetch fma3 f16c pclmul popcnt" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86 BPF" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="crocus i965 intel iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Reproducible: Always

Steps to Reproduce:
1. open any qt app on wayland
2. try to drag an icon (clicks work fine)
3.
Actual Results:  
segfaults
Comment 1 Gino McCarty 2023-07-20 06:11:47 UTC
Thread 1 "qtfm" received signal SIGSEGV, Segmentation fault.
0x00007ffff726f7a7 in QBasicDrag::updateCursor(Qt::DropAction) () from /usr/lib64/libQt5Gui.so.5
(gdb) bt
#0  0x00007ffff726f7a7 in QBasicDrag::updateCursor(Qt::DropAction) () from /usr/lib64/libQt5Gui.so.5
#1  0x00007ffff318bac0 in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#2  0x00007ffff6ed7d5e in ?? () from /usr/lib64/libQt5Core.so.5
#3  0x00007ffff318d8e9 in non-virtual thunk to QtWaylandClient::QWaylandDataSource::data_source_action(unsigned int) () from /usr/lib64/libQt5WaylandClient.so.5
#4  0x00007ffff6825772 in ?? () from /usr/lib64/libffi.so.8
#5  0x00007ffff6829f38 in ?? () from /usr/lib64/libffi.so.8
#6  0x00007ffff6829b20 in ffi_call () from /usr/lib64/libffi.so.8
#7  0x00007ffff58f9dfe in ?? () from /usr/lib64/libwayland-client.so.0
#8  0x00007ffff58f83c5 in ?? () from /usr/lib64/libwayland-client.so.0
#9  0x00007ffff58f7a6b in wl_display_dispatch_queue_pending () from /usr/lib64/libwayland-client.so.0
#10 0x00007ffff316d9e5 in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#11 0x00007ffff6ed7f00 in ?? () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff6f01a71 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#13 0x00007ffff6e9a856 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#14 0x00007ffff6e9f631 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#15 0x00005555555826f5 in ?? ()
#16 0x00007ffff68518ca in ?? () from /lib64/libc.so.6
#17 0x00007ffff6851985 in __libc_start_main () from /lib64/libc.so.6
#18 0x0000555555582341 in ?? ()
(gdb)
Comment 2 Gino McCarty 2023-07-20 06:21:20 UTC
Thread 1 "dolphin" received signal SIGSEGV, Segmentation fault.
0x00007ffff646f7a7 in QBasicDrag::updateCursor(Qt::DropAction) () from /usr/lib64/libQt5Gui.so.5
(gdb) bt
#0  0x00007ffff646f7a7 in QBasicDrag::updateCursor(Qt::DropAction) () from /usr/lib64/libQt5Gui.so.5
#1  0x00007ffff3b87ac0 in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#2  0x00007ffff60d7d5e in ?? () from /usr/lib64/libQt5Core.so.5
#3  0x00007ffff3b898e9 in non-virtual thunk to QtWaylandClient::QWaylandDataSource::data_source_action(unsigned int) () from /usr/lib64/libQt5WaylandClient.so.5
#4  0x00007ffff3297772 in ?? () from /usr/lib64/libffi.so.8
#5  0x00007ffff329bf38 in ?? () from /usr/lib64/libffi.so.8
#6  0x00007ffff329bb20 in ffi_call () from /usr/lib64/libffi.so.8
#7  0x00007ffff458bdfe in ?? () from /usr/lib64/libwayland-client.so.0
#8  0x00007ffff458a3c5 in ?? () from /usr/lib64/libwayland-client.so.0
#9  0x00007ffff4589a6b in wl_display_dispatch_queue_pending () from /usr/lib64/libwayland-client.so.0
#10 0x00007ffff3b699e5 in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#11 0x00007ffff60d7f00 in ?? () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff6101a71 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#13 0x00007ffff609a856 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#14 0x00007ffff609f631 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#15 0x00005555555c5a0a in ?? ()
#16 0x00007ffff5a518ca in ?? () from /lib64/libc.so.6
#17 0x00007ffff5a51985 in __libc_start_main () from /lib64/libc.so.6
#18 0x00005555555c2461 in ?? ()
(gdb)
Comment 3 urcindalo 2023-07-21 08:17:37 UTC
I can confirm it. Look at my last post in this seemingly unrelated bug: https://bugs.gentoo.org/910511#c10
Comment 4 Gino McCarty 2023-07-25 23:16:13 UTC
Perhaps this is a regression in 5.15.10, unfortunately the previous ebuilds have already been dropped from portage, would have made it easier to rollback
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 23:18:43 UTC
Could you build all of dev-qt/* with debugging symbols (https://wiki.gentoo.org/wiki/Debugging#Per-package) (feel free to skip qtwebengine obviously) and give us a new bt, ideally with some precise reproduction instructions as I don't use sway?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 23:20:37 UTC
https://bugs.kde.org/show_bug.cgi?id=472313 maybe.

Also, darkdefender, did you have a bug like this where you posted a workaround patch on bugs.kde.org, or am I misremembering? (Was it a monitor issue instead?)
Comment 7 Sebastian Parborg 2023-07-25 23:26:08 UTC
Do you mean the patch I posted in this report perhaps?
https://bugs.kde.org/show_bug.cgi?id=470925
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 23:27:19 UTC
(In reply to Sebastian Parborg from comment #7)
> Do you mean the patch I posted in this report perhaps?
> https://bugs.kde.org/show_bug.cgi?id=470925

Yes, thank you!
Comment 9 Sebastian Parborg 2023-07-25 23:30:02 UTC
I used that patch for a while seemingly without any issues.
So we could perhaps patch qtgui on our side.
But I would of course rather have upstream include it or fix it in other ways on their side.
Comment 10 Gino McCarty 2023-07-25 23:56:53 UTC
applied upstream patch to qtgui did not fix the issue for me.

rebuilding all of dev-qt/* use debug enabled
```
sudo USE=debug emerge -1av $(equery l dev-qt/* | cut -d' ' -f 2 | sed -E 's/^/=/')
```

will publish new `bt` when complete
Comment 11 Gino McCarty 2023-07-26 01:09:53 UTC
```
Thread 1 "qtfm" received signal SIGSEGV, Segmentation fault.
0x00007ffff706e33c in QPlatformDrag::updateAction(Qt::DropAction) () from /usr/lib64/libQt5Gui.so.5
(gdb) bt
#0  0x00007ffff706e33c in QPlatformDrag::updateAction(Qt::DropAction) () at /usr/lib64/libQt5Gui.so.5
#1  0x00007fffec181610 in  () at /usr/lib64/libQt5WaylandClient.so.5
#2  0x00007ffff6b4be5f in  () at /usr/lib64/libQt5Core.so.5
#3  0x00007fffec183459 in non-virtual thunk to QtWaylandClient::QWaylandDataSource::data_source_action(unsigned int) () at /usr/lib64/libQt5WaylandClient.so.5
#4  0x00007fffed706772 in  () at /usr/lib64/libffi.so.8
#5  0x00007fffed70af38 in  () at /usr/lib64/libffi.so.8
#6  0x00007fffed70ab20 in ffi_call () at /usr/lib64/libffi.so.8
#7  0x00007fffed71bdfe in  () at /usr/lib64/libwayland-client.so.0
#8  0x00007fffed71a3c5 in  () at /usr/lib64/libwayland-client.so.0
#9  0x00007fffed719a6b in wl_display_dispatch_queue_pending () at /usr/lib64/libwayland-client.so.0
#10 0x00007fffec160125 in  () at /usr/lib64/libQt5WaylandClient.so.5
#11 0x00007ffff6b4bfa6 in  () at /usr/lib64/libQt5Core.so.5
#12 0x00007ffff6b7bc21 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#13 0x00007ffff6b07f06 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#14 0x00007ffff6b0d7f1 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#15 0x000055555558e706 in main ()
(gdb)
```
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-26 01:11:02 UTC
(In reply to Gino McCarty from comment #10)
> applied upstream patch to qtgui did not fix the issue for me.
> 
> rebuilding all of dev-qt/* use debug enabled
> ```
> sudo USE=debug emerge -1av $(equery l dev-qt/* | cut -d' ' -f 2 | sed -E
> 's/^/=/')
> 
```
No, that's not what USE=debug is for. Please see the link I sent and use that. USE=debug is for assertions and is unrelated.
Comment 13 Gino McCarty 2023-07-26 01:32:02 UTC
ok thanks, sorry I missed that,

as for the patch, it causes dolphin and qtfm to no longer crash, but drag and drop still appears to be broken.

rebuilding again for proper `bt`
Comment 14 Andreas Sturmlechner gentoo-dev 2023-08-07 20:43:01 UTC
Please test this patch (apples fine over qtwayland-5.15.10: https://invent.kde.org/qt/qt/qtwayland/-/commit/22daca49b807fefba58113a06b86df4274e49f62
Comment 15 Gino McCarty 2023-08-07 20:52:53 UTC
(In reply to Andreas Sturmlechner from comment #14)
> Please test this patch (apples fine over qtwayland-5.15.10:
> https://invent.kde.org/qt/qt/qtwayland/-/commit/
> 22daca49b807fefba58113a06b86df4274e49f62

tested here, drag and drop no longer crashes, however it still remains broken,
tested in both dolphin and qtfm

my test is dragging a file into a folder in both apps

thanks!!
Comment 16 Gino McCarty 2023-08-07 21:55:19 UTC
probably worth mentioning, drag and drop work without issue when you do

QT_QPA_PLATFORM=egfs qtfm | dolphin
Comment 17 Andreas Sturmlechner gentoo-dev 2023-08-07 22:23:04 UTC
Thanks for testing.

Regarding the remaining issue, do you have sys-apps/xdg-desktop-portal installed and FUSE enabled in kernel?
Comment 18 Gino McCarty 2023-08-07 22:25:41 UTC
(In reply to Andreas Sturmlechner from comment #17)
> Thanks for testing.
> 
> Regarding the remaining issue, do you have sys-apps/xdg-desktop-portal
> installed and FUSE enabled in kernel?

yes and yes

```
equery l xdg-desktop-portal*
 * Searching for xdg-desktop-portal* ...
[IP-] [  ] gui-libs/xdg-desktop-portal-wlr-0.7.0:0
[IP-] [  ] sys-apps/xdg-desktop-portal-1.16.0-r1:0
[IP-] [  ] sys-apps/xdg-desktop-portal-gtk-1.14.1:0
```

```
lsmod|grep fuse
fuse                  139264  5
```
Comment 19 Andreas Sturmlechner gentoo-dev 2023-08-07 22:34:41 UTC
Please also make sure you have kde-misc/kio-fuse installed.
Comment 20 Gino McCarty 2023-08-08 04:51:56 UTC
(In reply to Andreas Sturmlechner from comment #19)
> Please also make sure you have kde-misc/kio-fuse installed.

i could see this being relevant for dolphin, but qtfm also replicates this issue which does not use the kio frameworks
Comment 21 Andreas Sturmlechner gentoo-dev 2023-08-08 08:04:20 UTC
My qtwayland MR was already merged upstream.

Can you describe in detail what's happening, now that it does not crash? "It's broken" is not sufficient for others to try and make sense of it.
Comment 22 Gino McCarty 2023-08-08 08:07:19 UTC
(In reply to Andreas Sturmlechner from comment #21)
> My qtwayland MR was already merged upstream.
> 
> Can you describe in detail what's happening, now that it does not crash?
> "It's broken" is not sufficient for others to try and make sense of it.

Its described above already..

the test is to drag a file or folder in qtfm and dolphin,
both do not allow icons to be picked up and dragged.
it doesn't crash anymore however, icons cannot be dragged or carried by the mouse.

This appears to effect all qt apps in wayland.

if i switch the backend to xcb, I can drag files and folders with the mouse without issue.
Comment 23 Andreas Sturmlechner gentoo-dev 2023-08-08 10:12:53 UTC
(In reply to Gino McCarty from comment #22)
> (In reply to Andreas Sturmlechner from comment #21)
> > My qtwayland MR was already merged upstream.
> > 
> > Can you describe in detail what's happening, now that it does not crash?
> > "It's broken" is not sufficient for others to try and make sense of it.
> 
> Its described above already..
> 
> the test is to drag a file or folder in qtfm and dolphin,
> both do not allow icons to be picked up and dragged.
> it doesn't crash anymore however, icons cannot be dragged or carried by the
> mouse.

You had described a test that I can't reproduce in my everyday usage of dolphin, we (and upstreams) need your observations that you provided just now.
Comment 24 Gino McCarty 2023-08-08 20:22:01 UTC
(In reply to Andreas Sturmlechner from comment #23)
> (In reply to Gino McCarty from comment #22)
> > (In reply to Andreas Sturmlechner from comment #21)
> > > My qtwayland MR was already merged upstream.
> > > 
> > > Can you describe in detail what's happening, now that it does not crash?
> > > "It's broken" is not sufficient for others to try and make sense of it.
> > 
> > Its described above already..
> > 
> > the test is to drag a file or folder in qtfm and dolphin,
> > both do not allow icons to be picked up and dragged.
> > it doesn't crash anymore however, icons cannot be dragged or carried by the
> > mouse.
> 
> You had described a test that I can't reproduce in my everyday usage of
> dolphin, we (and upstreams) need your observations that you provided just
> now.

Your saying drag and drop testing as described above works fine for you? 
your running in a wayland native DE? sway?

let me know how you would like me to proceed in testing.
Comment 25 Larry the Git Cow gentoo-dev 2023-08-08 20:22:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b6ed90eaaf1519bb56933d52ff785e372acb2c3

commit 4b6ed90eaaf1519bb56933d52ff785e372acb2c3
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-08-08 20:07:34 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-08-08 20:22:40 +0000

    dev-qt/qtwayland: Bump to QT5_KDEPATCHSET_REV=2
    
    Convert cursor bitmap to supported format
    QTBUG: https://bugreports.qt.io/browse/QTBUG-95434
    
    David Edmundson (1):
          client: Fix crash on dnd updates after client facing drag ends
    
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=470925
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=472313
    
    Closes: https://bugs.gentoo.org/910562
    Closes: https://bugs.gentoo.org/911832
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtwayland/Manifest                          |  1 +
 ...5.15.10-QTBUG-95434-convert-cursor-bitmap.patch | 66 ++++++++++++++++++++++
 dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild       | 57 +++++++++++++++++++
 3 files changed, 124 insertions(+)
Comment 26 Andreas Sturmlechner gentoo-dev 2023-08-08 20:30:34 UTC
(In reply to Gino McCarty from comment #24)
> Your saying drag and drop testing as described above works fine for you? 
> your running in a wayland native DE?
It works fine for me in Plasma Wayland, every day, now with that crash fixed as well. This bug is solved as far as the original reason of opening is concerned.

The other phenomenon you see is not described by anyone else in here and upstream bugs, so it is another, but a different, bug. Maybe https://bugs.kde.org/show_bug.cgi?id=459605
Comment 27 Gino McCarty 2023-08-08 20:35:37 UTC
(In reply to Andreas Sturmlechner from comment #26)
> (In reply to Gino McCarty from comment #24)
> > Your saying drag and drop testing as described above works fine for you? 
> > your running in a wayland native DE?
> It works fine for me in Plasma Wayland, every day, now with that crash fixed
> as well. This bug is solved as far as the original reason of opening is
> concerned.
> 
> The other phenomenon you see is not described by anyone else in here and
> upstream bugs, so it is another, but a different, bug. Maybe
> https://bugs.kde.org/show_bug.cgi?id=459605


Hmm, So..

1. I filed this ticket :)
2. I said DnD broken in all QT apps under wayland not as KDE apps crash..
3. The patch you applied in PR is different than the last one I tested in here, so I'll wait for it to sync, and cross my fingers that it fixes the issue.
4. for clarity this issue did not exist in the previous release of qtgui

Would you prefer I re-open here if dragging issues persist?

thanks!
Comment 28 Andreas Sturmlechner gentoo-dev 2023-08-08 21:53:38 UTC
(In reply to Gino McCarty from comment #27)
> 4. for clarity this issue did not exist in the previous release of qtgui
> 
> Would you prefer I re-open here if dragging issues persist?
For another crash with the same backtrace in newly fixed version you would re-open this bug.

(In reply to Gino McCarty from comment #22)
> both do not allow icons to be picked up and dragged.
> [...] icons cannot be dragged or carried by the mouse.
For the phenomenon you described for the first time properly in comment #22 you would open a new bug with as much as detailed description as possible for any future reader.
Comment 29 MrPenguin07 2023-08-10 00:24:58 UTC
I confirm this bug has been frustrating me for few weeks now.
Updated world last night and problem persists.
I had previously applied a patch to qtgui, which stopped the crashing, but drag drop remained broken.

Also affects GNS3 under wayland, running QT_QPA_PLATFORM=xcb allows normal drag drog.

Here's my backtrace (running dolphin);

Starting program: /usr/bin/dolphin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff03ff6c0 (LWP 29730)]
[New Thread 0x7fffef5ff6c0 (LWP 29731)]
[New Thread 0x7fffeedfe6c0 (LWP 29732)]
[New Thread 0x7fffeca556c0 (LWP 29733)]
[New Thread 0x7fffce9ff6c0 (LWP 29734)]
[New Thread 0x7fffd69ff6c0 (LWP 29735)]
[New Thread 0x7fffd61fe6c0 (LWP 29736)]
[New Thread 0x7fffd59fd6c0 (LWP 29737)]
[New Thread 0x7fffd51fc6c0 (LWP 29738)]
[New Thread 0x7fffd49fb6c0 (LWP 29739)]
[New Thread 0x7fffcffff6c0 (LWP 29740)]
[New Thread 0x7fffcf7fe6c0 (LWP 29741)]
[New Thread 0x7fffce1fe6c0 (LWP 29742)]
[New Thread 0x7fffcd9fd6c0 (LWP 29743)]
[New Thread 0x7fffcd1fc6c0 (LWP 29744)]
[New Thread 0x7fffcc9fb6c0 (LWP 29745)]
[New Thread 0x7fff9ffff6c0 (LWP 29746)]
[Detaching after fork from child process 29748]
[Detaching after fork from child process 29750]
[New Thread 0x7fff9f7fe6c0 (LWP 29752)]
[New Thread 0x7fff9ec1e6c0 (LWP 29753)]
[New Thread 0x7fff9d5776c0 (LWP 29755)]
[New Thread 0x7fff8bfff6c0 (LWP 29756)]
[Thread 0x7fff9d5776c0 (LWP 29755) exited]
[New Thread 0x7fff9d5776c0 (LWP 29757)]
[Detaching after fork from child process 29758]
[Detaching after fork from child process 29759]
[Detaching after fork from child process 29760]
[Detaching after fork from child process 29761]
[Detaching after fork from child process 29828]

Thread 1 "dolphin" received signal SIGSEGV, Segmentation fault.
0x00007ffff636829a in QDrag::dragCursor(Qt::DropAction) const () from /usr/lib64/libQt5Gui.so.5
Comment 30 Gino McCarty 2023-08-10 00:33:23 UTC
(In reply to Clint from comment #29)
> I confirm this bug has been frustrating me for few weeks now.
> Updated world last night and problem persists.
> I had previously applied a patch to qtgui, which stopped the crashing, but
> drag drop remained broken.
> 

I can also confirm Clint, same issue persists here as before.
though crashing has been fixed.

This issue is in all qt apps, under wayland not just KDE.

I think we won't get much traction here though, I suppose I can open another ticket that's basically a duplicate of this one.

Nice to know I'm not the only person having this issue. :)
Comment 31 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-10 00:50:02 UTC
Clint, your backtrace is truncated. Please include the full output after running "bt".

But it's not the same bug if it's not crashing for OP anymore.
Comment 32 MrPenguin07 2023-08-10 01:12:38 UTC
(In reply to Sam James from comment #31)
> Clint, your backtrace is truncated. Please include the full output after
> running "bt".
> 
> But it's not the same bug if it's not crashing for OP anymore.

Later i'll find the time to recompile qt and everything depending on dolphin to have another go.

Confirming dolphin crashes for me, the instant I attempt to drag drop something.
Running current testing @world.
Comment 33 Gino McCarty 2023-08-10 01:16:02 UTC
(In reply to Clint from comment #32)
> (In reply to Sam James from comment #31)
> > Clint, your backtrace is truncated. Please include the full output after
> > running "bt".
> > 
> > But it's not the same bug if it's not crashing for OP anymore.
> 
> Later i'll find the time to recompile qt and everything depending on dolphin
> to have another go.
> 
> Confirming dolphin crashes for me, the instant I attempt to drag drop
> something.
> Running current testing @world.

FYI qtwayland-5.15.10-r2 is ~amd64 not marked stable yet
Comment 34 Andreas Sturmlechner gentoo-dev 2023-08-10 08:08:22 UTC
(In reply to Clint from comment #29)
> I confirm this bug has been frustrating me for few weeks now.
> Updated world last night and problem persists.
(In reply to Gino McCarty from comment #33)
> FYI qtwayland-5.15.10-r2 is ~amd64 not marked stable yet

Exactly. Clint, make sure you have updated to that version, and drop your patch for qtgui (which one was that, btw?).


Please note that you are talking about separate issues at the same time here, so make it absolutely clear in your statements if you are having a crash or seeing something else.

That's why this should not be mixed in one single bug.
Comment 35 Andreas Sturmlechner gentoo-dev 2023-08-14 16:07:25 UTC
Gino, if you have a local overlay ready please try this modification to qtwayland ebuild:

--- a/dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild
+++ b/dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild
@@ -32,10 +32,6 @@ RDEPEND="${DEPEND}"
 BDEPEND="dev-util/wayland-scanner"
 
 PATCHES=(
-	# QTBUG-97037, pending upstream:
-	# https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/71
-	"${FILESDIR}/${PN}-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch"
-	"${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch"
	# QTBUG-95434, pending/approved upstream:
	# https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/79
	"${FILESDIR}/${P}-QTBUG-95434-convert-cursor-bitmap.patch"
Comment 36 Andreas Sturmlechner gentoo-dev 2023-08-14 16:22:56 UTC
(In reply to Andreas Sturmlechner from comment #35)
> Gino, if you have a local overlay ready please try this modification to
> qtwayland ebuild:
Even better if you first try only without "${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch"
Comment 37 Gino McCarty 2023-08-15 06:21:39 UTC
(In reply to Andreas Sturmlechner from comment #36)
> (In reply to Andreas Sturmlechner from comment #35)
> > Gino, if you have a local overlay ready please try this modification to
> > qtwayland ebuild:
> Even better if you first try only without
> "${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch"

Thanks! this fixed it!

I removed  #"${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch"
but left "${FILESDIR}/${PN}-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch"
and not drag and drop is working in both qtfm and dolphin
Comment 38 Larry the Git Cow gentoo-dev 2023-08-15 19:57:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1066a6eb7380bd5e67b4f1dc9cc1b0b5407d4d1

commit f1066a6eb7380bd5e67b4f1dc9cc1b0b5407d4d1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-08-15 19:55:05 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-08-15 19:55:05 +0000

    dev-qt/qtwayland: Drop broken patch
    
    QTBUG: https://bugreports.qt.io/browse/QTBUG-97037
    See also: https://codereview.qt-project.org/c/qt/qtwayland/+/495622
    
    Closes: https://bugs.gentoo.org/910562
    Bug: https://bugs.gentoo.org/911791
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtwayland/qtwayland-5.15.10-r3.ebuild | 56 ++++++++++++++++++++++++++++
 dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild | 56 ++++++++++++++++++++++++++++
 2 files changed, 112 insertions(+)