Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.6.2, 5.9.1
-
None
-
Qt 5.9.1 and 5.6.2, under Plasma 5.10.4 or 5.8.7.
Description
I noticed a crash in a program I develop, when dragging certain items (the ones that have an icon) from a QListWidget to another, when running under Plasma Desktop or LXQt, but not on Xfce or Mate.
I made a very small proof of concept, here: https://gitlab.com/bugpocs/WidgetListCrash
(I'll make an attachment if that helps)
The crash looks like this, triggered after dragging one of the items with icon from the left-side list to the right-side list:
./WidgetListCrash Trying to construct an instance of an invalid type, type id: 6553705 Trying to construct an instance of an invalid type, type id: 788558336 Trying to construct an instance of an invalid type, type id: 524358 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)
(I'm attaching a backtrace)
Dragging the items with no icon works fine.
I've tested this under Mageia, Debian and Archlinux, some i386, some x86_64, some under Plasma, some under other environments.
The crash does NOT happen under Xfce or Mate, for instance.
The crash also doesn't happen under Plasma, IF I run the program with XDG_CURRENT_DESKTOP=something-other-than-KDE. Besides Plasma, the crash also happens under LXQt, unless doing the above trick.
So basically, it seems like the crash is averted when Qt believes the environment is GTK-based.
I can reproduce this consistently, every time, under Plasma 5.10.4 or LXQt 0.11.
I found this other bug which looks very similar: QTBUG-15265
...but that one is a more complex case, and for Qt 4. Ironically, my crash doesn't happen when building the example with Qt 4, only with Qt 5.
Thank you for your time!!
Attachments
Issue Links
- relates to
-
QTBUG-15265 QListWidget, drag and drop action segmentation fault.
- Closed