-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panini 0.73 segfaults immediately on startup #10
Comments
Can you also upload the picture? Somehow it seems to be related to the Qt theme that is set. |
@waltkelly Do you see same crash if you do
Since the segfault is in the setupUi(), which is autogenerated, it seems that there is a problem with your Qt install or the compiled application is not rebuilt properly. Remove all generated files and recompile would be first step. |
Getting the same now on my system:
|
@luis-pereira sorry for pinging you here. I know this is not LXQt ;) But I wanted to ask you if you see what's going on here? |
@jubalh Will take a quick look. |
@jubalh My guess is that your crash occurs when using qt5ct. Not qt5ct fault, tough. It's debug messages makes |
Thank you for checking @luis-pereira !
You are right. It compiles and runs fine without those. |
It's probably a combination of bad timing and the |
Were you using qt5ct before ? |
I'm not sure. I never decided on using the one or the other consciously. |
It's an environment variable. |
Yes it's set to qt5ct:
But I don't know what/where it was set. And what other values I should use. And I suppose I should change Panini so it works with whatever value is set there. |
Of course. Why was |
I suppose there was no reason. I could use:
But I think QErrorMessage(this) is needed and it's a static method, no? |
This should work: diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index f376161..c68cd5d 100755
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -18,6 +18,7 @@
*/
#include <QtGui>
+#include <QErrorMessage>
#include <QSettings>
#include <QMessageBox>
#include "MainWindow.h"
@@ -32,20 +33,22 @@
static void errMsgHandler( QtMsgType type, const QMessageLogContext &context, const QString &msg){
QString s;
bool die = false;
+ QErrorMessage *errorMessage = new QErrorMessage(nullptr);
+ errorMessage->setModal(true);
switch( type ){
case QtDebugMsg:
s = "Debug: ";
case QtWarningMsg:
s += msg;
- QMessageBox::warning( 0, "pvQt", s );
+ errorMessage->showMessage(s, "pvQt");
break;
case QtFatalMsg:
die = true;
s = "Fatal: ";
case QtCriticalMsg:
s += msg;
- QMessageBox::critical( 0, "pvQt", s );
+ errorMessage->showMessage(s, "pvQt");
break;
} |
You can also use |
Thanks @luis-pereira !
too. But this one segfaulted also. But your solution works fine! :) |
It segfaults with both debug and release builds.
Commands to build:
ggdb backtrace:
segfault.txt
qmake generated Makefile (.txt extension added to be able to upload):
Makefile.txt
My system:
The text was updated successfully, but these errors were encountered: