Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63546

Dragging QListWidgetItems with icons makes program crash under some desktop envs, not others

    XMLWordPrintable

Details

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              liaqi Liang Qi
              jankusanagi JanKusanagi
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes