Unhandled exception at Qt5Widgets.dll
-
Hi,
When I am trying to just open a simple Dialog or adding Qtoolbutton in Qt 5 ui file. I am getting the following unhandled exception. Do anybody is having any idea about this ?
Unhandled exception at 0x64ac4f10 (Qt5Widgetsd.dll) : 0xC0000005: Access violation reading location 0xffffffffffffffff.
I am not understanding what I am doing wrong. Any help would be appreciated.
-
That looks like an uninitialised pointer. Do you know where in your code does it fail? Can you provide some more details?
-
Yes sure. Following is the call stack :
Qt5Widgetsd.dll!QDialogButtonBoxPrivate::initLayout() Line 297 + 0x38 bytes C++
Qt5Widgetsd.dll!QDialogButtonBox::QDialogButtonBox(QWidget * parent=0x00000000002ef790) Line 658 C++
The code fails at qdialogButtonBox.cpp:
layoutPolicy = QDialogButtonBox::ButtonLayout(q->style()->styleHint(QStyle::SH_DialogButtonLayout, 0, q));Strange thing is that the dialog is very simple, removed all the stuff from the dialog and it only contains two buttons. It does not reach to Show () also, just fails at setupUi (this);
-
Hm. This does not look like a bug in your code. Are you using Qt 5.2 or some older version?
-
If possible, try with Qt 5.2 or Qt 5.2.1. Maybe it has been fixed already.
-
One more info, may be you know about this:
[Frames below may be incorrect and/or missing] in Qt5Widgets.dll.
The above line I am getting in call stack. Following are the complete call stack :
feeefeee() Unknown
[Frames below may be incorrect and/or missing]
Qt5Widgetsd.dll!64c62fae() Unknown
Qt5Widgetsd.dll!64c6102c() Unknown
[External Code]Appl.exe!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::operator->() Line 109 C++
Qt5Cored.dll!672c20b3() Unknown
Qt5Cored.dll!67194e47() Unknown
Qt5Cored.dll!6719de29() Unknown
Qt5Widgetsd.dll!64ca84c5() Unknown
Qt5Widgetsd.dll!64ca8b94() Unknown
Qt5Cored.dll!66f1b87d() Unknown
Qt5Widgetsd.dll!64c62fae() Unknown
Qt5Widgetsd.dll!64c6102c() Unknown
[External Code]
Qt5Cored.dll!6721c837() Unknown
[External Code]
Qt5Cored.dll!672c20b3() Unknown
Qt5Cored.dll!67194e47() Unknown
Qt5Cored.dll!6719de29() Unknown
Qt5Cored.dll!67195eb6() Unknown
[External Code]
Qt5Guid.dll!008ae5bd() Unknown
qwindowsd.dll!00f46a24() Unknown
Qt5Cored.dll!6721c7d0() Unknown
Qt5Cored.dll!6721e58c() Unknown
[External Code]
Qt5Cored.dll!6721d22f() Unknown
Qt5Cored.dll!66fb42d2() Unknown
Qt5Cored.dll!66ed8816() Unknown
Qt5Cored.dll!66fba382() Unknown
Qt5Cored.dll!66fb42d2() Unknown -
@sierdzio "If possible, try with Qt 5.2 or Qt 5.2.1. Maybe it has been fixed already."
I'm using Qt 5.7 and I still get that error.
-
@Donald-Duck Hi and welcome to devnet,
Can you provide a minimal compilable example that reproduce this behavior ?
-
In addition:
Appl.exe!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::operator->() Line 109 C++
This is a reference to the
QObject
's private API. There's a big fat warning in the headers about using the private API.