QT 5.14.2 crashes on Centos 7.9
-
Hi,
I installed QT 5.14.2 with the qt-opensource-linux-x64-5.14.2.run binary. I suppose what this binary file do is mainly extract and copy/paste, so my gcc version does not matter.
When I start my app, it crashed right after the login window turns off. The gdb backtrace is the following.
(gdb) bt
#0 0x00007f0a01d294bc in malloc_consolidate () from /lib64/libc.so.6
#1 0x00007f0a01d2a20e in _int_free () from /lib64/libc.so.6
#2 0x00007f09ebf690c8 in QXcbBackingStoreImage::destroy(bool) ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#3 0x00007f09ebf69c89 in QXcbBackingStore::~QXcbBackingStore() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#4 0x00007f09ebf69d39 in QXcbBackingStore::~QXcbBackingStore() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#5 0x00007f0a03f2c22b in QBackingStore::~QBackingStore() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Gui.so.5
#6 0x00007f0a046b7f27 in deleteBackingStore(QWidgetPrivate*) ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#7 0x00007f0a046b7fa3 in QWidgetPrivate::deleteTLSysExtra() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#8 0x00007f0a046bd4f8 in QWidget::destroy(bool, bool) () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()
#11 0x00007f0a01ccb555 in __libc_start_main () from /lib64/libc.so.6
#12 0x000000000047a3e4 in _start ()I guess QT calls free in glibc, and the free function crashes. Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
Anyone could help me out? Thanks a lot.
-
Hi,
I installed QT 5.14.2 with the qt-opensource-linux-x64-5.14.2.run binary. I suppose what this binary file do is mainly extract and copy/paste, so my gcc version does not matter.
When I start my app, it crashed right after the login window turns off. The gdb backtrace is the following.
(gdb) bt
#0 0x00007f0a01d294bc in malloc_consolidate () from /lib64/libc.so.6
#1 0x00007f0a01d2a20e in _int_free () from /lib64/libc.so.6
#2 0x00007f09ebf690c8 in QXcbBackingStoreImage::destroy(bool) ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#3 0x00007f09ebf69c89 in QXcbBackingStore::~QXcbBackingStore() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#4 0x00007f09ebf69d39 in QXcbBackingStore::~QXcbBackingStore() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#5 0x00007f0a03f2c22b in QBackingStore::~QBackingStore() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Gui.so.5
#6 0x00007f0a046b7f27 in deleteBackingStore(QWidgetPrivate*) ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#7 0x00007f0a046b7fa3 in QWidgetPrivate::deleteTLSysExtra() ()
from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#8 0x00007f0a046bd4f8 in QWidget::destroy(bool, bool) () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()
#11 0x00007f0a01ccb555 in __libc_start_main () from /lib64/libc.so.6
#12 0x000000000047a3e4 in _start ()I guess QT calls free in glibc, and the free function crashes. Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
Anyone could help me out? Thanks a lot.
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()It looks like you're deleting a widget? Can you show the code where you delete it?
-
I dont think I called delete operator explicitly. I have a class that inherits from QMainWindow, like the following:
class dlgMainWin: public QMainWindow
{
Q_OBJECT
public:
explicit dlgMainWin(QWidget* parent = 0);
~dlgMainWin();// other parts .......................
}Constructor:
dlgMainWin::dlgMainWin(QWidget* parent)
: QMainWindow(parent)
{
std::cout << "test constructor..." << std::endl;// other parts .....................
}The output line that I put on the very first line of constructor never show up, so I suspect the code crashed in the constructor of QMainWindow.
-
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
I have run Qt 5.15 on CentOS 7 with GCC 7 (devtoolset-7). Widgets work fine -- no crashes.
-
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()It looks like you're deleting a widget? Can you show the code where you delete it?
@jsulm said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()It looks like you're deleting a widget? Can you show the code where you delete it?
@JKSH said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
I have run Qt 5.15 on CentOS 7 with GCC 7 (devtoolset-7). Widgets work fine -- no crashes.
I am using GCC 11, considering to try 7.
-
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
it crashed right after the login window turns off.
What is the "login window", and how does it related to your dlgMainWin?
@ChrisW67 said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
it crashed right after the login window turns off.
What is the "login window", and how does it related to your dlgMainWin?
They don't have any interaction.
-
@jsulm said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()It looks like you're deleting a widget? Can you show the code where you delete it?
@JKSH said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
I have run Qt 5.15 on CentOS 7 with GCC 7 (devtoolset-7). Widgets work fine -- no crashes.
I am using GCC 11, considering to try 7.
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
@jsulm said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
#9 0x00007f0a046c5203 in QWidget::~QWidget() () from /opt/yadev/3rdParty/cpp/Nokia/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Widgets.so.5
#10 0x000000000044dc50 in main.cold ()It looks like you're deleting a widget? Can you show the code where you delete it?
@JKSH said in QT 5.14.2 crashes on Centos 7.9:
@QQMJ said in QT 5.14.2 crashes on Centos 7.9:
Is the free function called on a nullptr, or the glibc library is not compatible with QT 5.14.2? The glibc version is 2.17 on Centos 7.9.
I have run Qt 5.15 on CentOS 7 with GCC 7 (devtoolset-7). Widgets work fine -- no crashes.
I am using GCC 11, considering to try 7.
I have tried GCC 7.3. Everything worked fine. I think the problem could be related to libwrast. When I was using GCC 11, the binary complains could not load libwrast. This warning disappears after I switched to GCC 7.