Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,105
    • Issues 4,105
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #20981
Closed
Open
Issue created Jul 17, 2020 by Alexander Shirokov@shirokovalexs

cmake-gui: crashes with Qt 5.15

cmake-gui crashes after calling it.

Example:

cmake-gui .
[1]    56767 segmentation fault (core dumped)  cmake-gui .
cmake-gui
[1]    58131 segmentation fault (core dumped)  cmake-gui

Backtrace:

Thread 1 "cmake-gui" received signal SIGSEGV, Segmentation fault.
0x00007ffff6ba06c4 in qHash(QString const&, unsigned int) ()
   from /usr/lib/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff6ba06c4 in qHash(QString const&, unsigned int) ()
    at /usr/lib/libQt5Core.so.5
#1  0x00005555556362a1 in QCMakeCacheModel::setProperties(QList<QCMakeProperty> const&)
    ()
#2  0x0000555555638b62 in QCMakeCacheModel::setViewType(QCMakeCacheModel::ViewType) ()
#3  0x000055555561576e in CMakeSetupDialog::setGroupedView(bool) ()
#4  0x0000555555616077 in CMakeSetupDialog::CMakeSetupDialog() ()
#5  0x0000555555607b84 in main ()

Workaround

This dirty modification fixes the trouble

--- a/Source/QtDialog/QCMakeCacheView.cxx	2020-07-15 14:19:20.000000000 +0300
+++ b/Source/QtDialog/QCMakeCacheView.cxx	2020-07-17 22:55:04.558439571 +0300
@@ -217,27 +217,27 @@
   QSet<QCMakeProperty> newProps2;
 
   if (this->ShowNewProperties) {
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
+//#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
     newProps = props.toSet();
-#else
-    newProps = QSet<QCMakeProperty>(props.begin(), props.end());
-#endif
+//#else
+//    newProps = QSet<QCMakeProperty>(props.begin(), props.end());
+//#endif
     newProps2 = newProps;
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
+//#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
     QSet<QCMakeProperty> oldProps = this->properties().toSet();
-#else
-    QSet<QCMakeProperty> oldProps = QSet<QCMakeProperty>(
-      this->properties().begin(), this->properties().end());
-#endif
+//#else
+//    QSet<QCMakeProperty> oldProps = QSet<QCMakeProperty>(
+//      this->properties().begin(), this->properties().end());
+//#endif
     oldProps.intersect(newProps);
     newProps.subtract(oldProps);
     newProps2.subtract(newProps);
   } else {
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
+//#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
     newProps2 = props.toSet();
-#else
-    newProps2 = QSet<QCMakeProperty>(props.begin(), props.end());
-#endif
+//#else
+//    newProps2 = QSet<QCMakeProperty>(props.begin(), props.end());
+//#endif
   }
 
   bool b = this->blockSignals(true);

System info:

OS: ArchLinux

qt5-base : 5.15.0

cmake : 3.18.0

Please let me know if any additional information needed, and thank you for your time!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking