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

Virtual Keyboard causes Crash when Cancelling non-native QFileDialog

    XMLWordPrintable

Details

    • c25ad981a334a4a720ae48cfe800868c4aef51a9

    Description

      In our minimal example the Qt Virtual Keyboard is enabled in main.cpp. If this is enabled and the user dismisses a QFileDialog, there is a crash in the application. This crash does not always occur on the first dismissal but will happen soon after on subsequent dismissals ("Cancel"s).

      The minimal code has a main window with a button to bring up a file dialog. Hit cancel on that file dialog when line 7 in main.cpp ( qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); ) is enabled. Comment out line 7 and there is no crash.

      Some observations: if I run this code in the 5.8 beta release the file dialog is native to Ubuntu (gnome). In 5.7.0 it is showing a non-native Qt dialog with identical code. In 5.8 beta the virtual keyboard does not appear when trying to edit the native file dialog - this is suspected to be as designed. In the 5.7 non-native file dialog, the keyboard shows (again, as expected).

      Attachments

        1. main.cpp
          0.3 kB
        2. mainwindow.cpp
          0.4 kB
        3. mainwindow.h
          0.3 kB
        4. mainwindow.ui
          1 kB
        5. VirtKeyboardUbuntu1604Crash_StackTrace.txt
          57 kB
        6. VirtualKeyboardCrash.pro
          0.4 kB
        7. VirtualKeyboardCrash.pro.user
          24 kB
        8. VirtualKeyboardCrash.zip
          9 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-57193
          # Subject Branch Project Status CR V

          Activity

            People

              mitch_curtis Mitch Curtis
              jdgibbs Jason Gibbs
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes