Package: qtcreator
Version: 3.5.1+dfsg-2
Severity: normal

Dear Maintainer,

The issue can be reporduced using the attached CMakeLists.txt and
qt_creator_hang.cpp files. The code itself is non-sensical, but seems to be
synctatically valid and gets compiled cleanly. It has been extracted from a
much longer sorce file.

Once the project is opened with QtCrator and qt_creator_hang.cpp is opened in
editor, htop shows 100% cpu usage on one core. When user tries to edit the
qt_creator_hang.cpp file additional threads are spawned and all available cpu
cores are getting full load. Though QtCreator seems to continue to work
correctly, it connot be cleanly closed once the issue appears.

The issue is not observed, when the following line is skipped in
CMakeLists.txt.
        set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" )
With the above line skipped QtCreator also get 100% usage after opening the
qt_creator_hang.cpp, but the load drops in a few seconds. Also, when editing
the file additional threads are being spawned and additional cores are being
employed, but the load drops back to low after a few seconds without input.

Regards,
Dominik Wójt

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.utf8, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages qtcreator depends on:
ii  libbotan-1.10-1                       1.10.10-6+b1
ii  libc6                                 2.19-22
ii  libclang1-3.6                         1:3.6.2-3
ii  libgcc1                               1:5.2.1-23
ii  libqbscore1                           1.4.3+dfsg-3
ii  libqbsqtprofilesetup1                 1.4.3+dfsg-3
ii  libqt5concurrent5                     5.5.1+dfsg-6
ii  libqt5core5a [qtbase-abi-5-5-1]       5.5.1+dfsg-6
ii  libqt5designer5                       5.5.1-3
ii  libqt5designercomponents5             5.5.1-3
ii  libqt5gui5                            5.5.1+dfsg-6
ii  libqt5help5                           5.5.1-3
ii  libqt5network5                        5.5.1+dfsg-6
ii  libqt5printsupport5                   5.5.1+dfsg-6
ii  libqt5qml5 [qtdeclarative-abi-5-5-0]  5.5.1-3
ii  libqt5quick5                          5.5.1-3
ii  libqt5quickwidgets5                   5.5.1-3
ii  libqt5sql5                            5.5.1+dfsg-6
ii  libqt5sql5-sqlite                     5.5.1+dfsg-6
ii  libqt5webkit5                         5.5.1+dfsg-2
ii  libqt5widgets5                        5.5.1+dfsg-6
ii  libqt5xml5                            5.5.1+dfsg-6
ii  libstdc++6                            5.2.1-23
ii  qml-module-qtquick-controls           5.5.1-2
ii  qml-module-qtquick2                   5.5.1-3
ii  qtchooser                             52-gae5eeef-2
ii  qtcreator-data                        3.5.1+dfsg-2

Versions of packages qtcreator recommends:
ii  gdb                                   7.10-1
ii  make                                  4.0-8.2
pn  qt5-doc                               <none>
ii  qtbase5-dev-tools                     5.5.1+dfsg-6
ii  qtcreator-doc                         3.5.1+dfsg-2
ii  qtdeclarative5-dev-tools              5.5.1-3
ii  qttools5-dev-tools                    5.5.1-3
ii  qttranslations5-l10n                  5.5.1-2
ii  qtxmlpatterns5-dev-tools              5.5.1-2
ii  xfce4-terminal [x-terminal-emulator]  0.6.3-2
ii  xterm [x-terminal-emulator]           320-1

Versions of packages qtcreator suggests:
ii  cmake          3.3.2-2
ii  g++            4:5.2.1-4
ii  git            1:2.6.2-1
pn  kdelibs5-data  <none>
pn  subversion     <none>
#include <vector>

struct B
{
    struct C
    {
        int m_y;
    };
};

int main()
{
    const std::vector<B::C> cV;
    std::vector<B::C>::const_iterator end = cV.end();

    for(
            std::vector<B::C>::const_reverse_iterator i = cV.rbegin();
            i != cV.rend();
            ++i)
    {
        if(i->m_y)
        {
            end = i.base();
            break;
        }
    }

    return 1;
}
cmake_minimum_required(VERSION 2.6)

project(qtcreator_hang)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    # using Clang
    set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    # using GCC
    set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
    # using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    # using Visual Studio C++
endif()

add_executable(qt_creator_hang qt_creator_hang.cpp)

Reply via email to