Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
Hello,
I have Qt GUI library which shows dialogs such as login. We use it with Firefox which calls the Qt library that should show a dialog. But at this point Firefox is closed with segmantation error.
I can use my Qt GUI library from non-Qt application by providing the QApplication inside the library and it works. I have the GTK 2.0 installed.
Thanks for any help you provide.
Barak
Re: Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
That's way too few information to give a good answer.
So, install and/or rebuild the respective packages (firefox, qt, etc...) with debug information.
Then run it all through gdb and get a backtrace. Using the backtrace you can already see where the problem might be. If not, use the information to step through the program and look at the registers and variables.
A segmentation fault happens when you try to access memory you're not supposed to access (like in an uninitialized pointer)
Re: Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
Thanks. How do I add debug information to my Qt library? Could it be related to the gtk-qt?
Re: Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
OK it is crashing when I create the QApplication object:
Re: Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
Passing it two nulls is probably what's causing the crash. You can't pass arbitrary values to objects and expect them to work.
Re: Firefox crush when try to show dialog from Qt GUI library (Linux ubuntu)
The full code is:
Code:
if (!qApp){
int argc = 1;
char *argv[] = { "asePinDialog", NULL };
//QApplication b(argc,argv);
}
m_iLastSlotId = aseData.slotID;
ChangePin *pinDlg = new ChangePin(aseData);
m_pOpenDialog = pinDlg;
pinDlg->exec();
//pinDlg->show();
bool bRet
= (pinDlg
->result
() == QDialog::Accepted);
delete pinDlg;
m_pOpenDialog = NULL;
m_iLastSlotId = 0;
if(a){
a->exit();
delete a;
a = 0;
}
return bRet;