MantisBT - CMake
View Issue Details
0013996CMakeQtDialogpublic2013-03-09 13:102013-10-07 10:04
Andrea Scarpino 
Stephen Kelly 
normalcrashalways
closedfixed 
LinuxArch Linux
CMake 2.8.10.2 
CMake 2.8.11CMake 2.8.11 
0013996: cmake-gui needs to work around Qt 5.0.0-5.0.2 bug to avoid freezing
If you build cmake upon Qt5, the second time you click on the "Configure" button in the cmake-gui app, the system freezes. After a bit, the kernel kills cmake-gui.

% cmake-gui
Cannot create accessible interface for object: QHeaderView(0x1c12da0)
Cannot create accessible interface for object: QCMakeCacheView(0x1c0e940, name = "CacheValues")
Cannot create accessible interface for object: QCMakeCacheView(0x1c0e940, name = "CacheValues")
Cannot create accessible interface for object: QCMakeCacheView(0x1c0e940, name = "CacheValues")
Cannot create accessible interface for object: QComboBoxListView(0x1bceab0)
Cannot create accessible interface for object: QComboBoxListView(0x1bceab0)
[1] 25843 killed cmake-gui

Ask if you need more info.
Build cmake using Qt5.
Create a new build dir and run cmake-gui, configure the project.
Configure the project again: the system freezes.
cmake 2.8.10.2
qt 5.0.1
No tags attached.
patch arch-qt5.patch (931) 2013-03-09 19:14
https://public.kitware.com/Bug/file/4675/arch-qt5.patch
Issue History
2013-03-09 13:10Andrea ScarpinoNew Issue
2013-03-09 19:14Bart Janssens 2File Added: arch-qt5.patch
2013-03-09 19:17Bart Janssens 2Note Added: 0032563
2013-03-11 05:44Stephen KellyNote Added: 0032566
2013-03-11 05:48Stephen KellyNote Added: 0032567
2013-03-11 10:10Brad KingNote Added: 0032574
2013-03-11 10:54Stephen KellyNote Added: 0032575
2013-03-11 11:24Brad KingAssigned To => Clinton Stimpson
2013-03-11 11:24Brad KingStatusnew => assigned
2013-03-11 17:21Bart Janssens 2Note Added: 0032586
2013-03-12 06:36Stephen KellyNote Added: 0032588
2013-03-12 18:22Bart Janssens 2Note Added: 0032595
2013-03-12 18:46Brad KingNote Added: 0032597
2013-03-13 13:35Brad KingAssigned ToClinton Stimpson => Stephen Kelly
2013-03-13 13:35Brad KingStatusassigned => resolved
2013-03-13 13:35Brad KingResolutionopen => fixed
2013-03-13 13:35Brad KingFixed in Version => CMake 2.8.11
2013-03-13 13:35Brad KingTarget Version => CMake 2.8.11
2013-03-13 13:35Brad KingSummarycmake-gui freezes if built with Qt5 => cmake-gui needs to work around Qt 5.0.0-5.0.2 bug to avoid freezing
2013-10-07 10:04Robert MaynardNote Added: 0034002
2013-10-07 10:04Robert MaynardStatusresolved => closed

Notes
(0032563)
Bart Janssens 2   
2013-03-09 19:17   
Confirmed also using latest from git. Attached is a patch that *seems* to solve it, apparently the loop goes beyond the maximum number of rows. No idea why this only happens in QT5.
(0032566)
Stephen Kelly   
2013-03-11 05:44   
I can't reproduce this with the latest from the qtbase stable branch.
(0032567)
Stephen Kelly   
2013-03-11 05:48   
Presumably f136701bc50b63b90281856c2ab5953a40f4b868 in qtbase fixes the issue.
(0032574)
Brad King   
2013-03-11 10:10   
Even if this is a Qt bug we could still work around it if it is in a Qt release.

Can the proposed patch be applied conditionally with a #if on the version of Qt?
(0032575)
Stephen Kelly   
2013-03-11 10:54   
Yes, presumably the patch is needed if Qt is less than 5.0.2 (due out soon), so

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 2)

might do it.
(0032586)
Bart Janssens 2   
2013-03-11 17:21   
This was introduced by 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22, which first appeared in 5.0.0-beta1
(0032588)
Stephen Kelly   
2013-03-12 06:36   
Please try the cmake next branch. I've pushed a fix there.
(0032595)
Bart Janssens 2   
2013-03-12 18:22   
This didn't work, I think your patch checks is the index is both beyond the end and before the start at the same time. I modified it like this, and that works:

      while(!idxs.isEmpty() && (
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 3)
        (idxs.last().row()+1) >= rowCount(idxs.last().parent()) ||
#endif
        !idxs.last().sibling(idxs.last().row()+1, 0).isValid()))
(0032597)
Brad King   
2013-03-12 18:46   
Re 0013996:0032595: Thanks, I squashed that into Stephen's commit to produce this:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=404e1d67 [^]
(0034002)
Robert Maynard   
2013-10-07 10:04   
Closing resolved issues that have not been updated in more than 4 months.