Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15233

ThemeSettingsWidget crashes when list of themes empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 3.6.0-rc1
    • Qt Creator 4.0.0-beta1
    • All Other Issues
    • None
    • Archlinux
      About: Qt Creator 3.5.81
      Based on Qt 5.5.1 (GCC 5.2.0, 64 bit)

    Description

      I built the git version and according to https://wiki.qt.io/index.php?title=Building_Qt_Creator_from_Git&oldid=19441 started without installing.

      Apparently that doesn't work properly due to themes not being found. First a proper warning is shown:

      Warning: no themes found in path: "/home/zulan/code/BUILD-qt-creator/DEBUG/share/qtcreator/themes"

      But then qt-creator crahes:

      ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/qt/QtCore/qlist.h, line 518

      Program received signal SIGABRT, Aborted.
      0x00007ffff478f5f8 in raise () from /usr/lib/libc.so.6
      (gdb) bt
      #0 0x00007ffff478f5f8 in raise () from /usr/lib/libc.so.6
      #1 0x00007ffff4790a7a in abort () from /usr/lib/libc.so.6
      #2 0x00007ffff598afc1 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt5Core.so.5
      #3 0x00007ffff5986191 in qt_assert_x(char const*, char const*, char const*, int) () from /usr/lib/libQt5Core.so.5
      #4 0x00007fffe36bc293 in QList<Core::Internal::ThemeEntry>::operator[] (this=0x7fffffffc070, i=0) at /usr/include/qt/QtCore/qlist.h:518
      #5 0x00007fffe36b8cfe in Core::Internal::ThemeSettingsWidget::refreshThemeList (this=0x96c460)
      at /home/zulan/code/qt-creator/src/plugins/coreplugin/themesettingswidget.cpp:252
      #6 0x00007fffe36b8504 in Core::Internal::ThemeSettingsWidget::ThemeSettingsWidget (this=0x96c460, parent=0x96c600)
      at /home/zulan/code/qt-creator/src/plugins/coreplugin/themesettingswidget.cpp:209

      The reason is rather obvious, the code tries to index an empty list of themes.

      Attachments

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

        Activity

          People

            con Eike Ziller
            Zulan Zulan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes