Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
32bit application is running. 64 bit application is crashing. (connect statement is creating problem.)
I have mingw 32 bit application running. but when I build it using 64bit compiler, It is getting build but crashing before showing something.
When I used the debugger, It is crashing after a connect statement.
connect(m_LoginDialog, SIGNAL(rejected()), this, SLOT(DialogClosed()));
Same connect is working fine in 32bit application. Why it is crashing in 64 bit application?
Why it is crashing in 64 bit application?
Please provide a proper backtrace here - either you mix 32 and 64bit libraries or it works by accident here. Make sure m_LoginDialog is valid.
I am selecting 64 bit kit for full application. So obviously Library is also getting build in 64 bit.
And m_LoginDialog is valid and not Null.
Please provide a backtrace.
This is not the crash, while put the code snippet in the try it's not moving in to the catch block. the application just exit with assert message after below connect statement.
"connect(m_LoginDialog, SIGNAL(rejected()), this, SLOT(DialogClosed()));"
Below is the assert message:
Fatal:26-12-2019 00:25:20: kernel\qmetaobject.cpp:161, (null): ASSERT: "data.ptr->ref.isStatic()" in file kernel\qmetaobject.cpp, line 161
The code is same as 32 bit and running as expected. But getting issue with 64 bit.
@Bikram-Shishodia Still no backtrace - so no help from me anymore.
Is this what you want? :
After red marked connect statement, application is crashing(exiting). I am creating object of m_LoginDialog just before that line.
You can see the application output as well in snapshot.
and the data printing in log is: Fatal:26-12-2019 13:08:34: kernel\qmetaobject.cpp:154, (null): ASSERT: "data.ptr->ref.isStatic()" in file kernel\qmetaobject.cpp, line 154
Please show SSMainWindow.cpp, line 45 and around.
Please do not post screenshots... it's not really readable. Currently you're just on a breakpoint, but no crash happened until now.
I would try to minimize the code until it does not crash anymore.
That is what I am saying. After that connect statement application crashing.
And we already have working application in 32 bit. We are building it in 64 bit and it is not running.
Same code is working fine If I am using 32 bit kit.
After that connect statement application crashing.
But you did not really posted a stack trace of the crash... only the one where you stopped your debugger...
hskoglund last edited by
Hi, just guessing but I had some trouble before with connect() statements for 64-bit, and the problem vanished when I switched from using the old style with SIGNAL() and SLOT() to using the new style connect() syntax with instanceptrs + &classname::methodnames,