[Solved] setIcon raises SIGSEGV Qt5
-
Hi,
I got a sigsegv wherever I call setIcon, any idea?
@
exitAction->setIcon(QIcon::fromTheme("application-exit", QIcon(":/images/svg/server-database.svg")));
@ -
I'm not sure if you run it on Linux platform. Maybe you can use debug tool for tracing this error. like gdb. Usually, this kind of error is very simple if you use gdb
-
Maybe you call setIcon before initialise the action?
Anyway there is very few code, for saying something. -
I found the problem. It is not in setIcon is in QIcon::fromTheme.
Does someone know if there is a problem with fromTheme?
-
This is the gdb
<699bt
&"bt\n"
~"#0 0x00007ffff3578bf8 in QIcon::~QIcon() () from /opt/Qt5.0.1/5.0.1/gcc_64/lib/libQt5Gui.so.5\n"
~"#1 0x00000000004de416 in MainWindow::createActions (this=0x942b40) at ../qt-mysql-gui-5/mainwindow.cpp:278\n"
~"#2 0x00000000004dbd84 in MainWindow::MainWindow (this=0x942b40) at ../qt-mysql-gui-5/mainwindow.cpp:97\n"
~"#3 0x0000000000420f63 in main (argc=1, argv=0x7fffffffe168) at ../qt-mysql-gui-5/main.cpp:14\n"
699^done -
The code works fine on Qt 4.8 same machine. Any Ideas?
-
It was a bug, see the "report":https://bugreports.qt-project.org/browse/QTBUG-30496.