Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
4.7.0, 4.7.2
-
None
-
Windows 7 x64, using x64 Release build of Qt compiled with Visual Studio 2010 Ultimate
Description
To reproduce, create a new Qt Creator QMainWindow project. Drop in a QListView. Switch to Release build. Build & Run. Crash.
Crash is a nullpointer exception (0xC0000005)
If I try to attach a debugger (I built Release w/ PDBs), this is my stack:
QtGui4.dll!QAbstractItemView::viewOptions() Line 3484 + 0xe bytes C++
QtGui4.dll!QListView::viewOptions() Line 925 + 0x5 bytes C++
QtGui4.dll!QAbstractItemViewPrivate::viewOptionsV4() Line 3492 + 0x11 bytes C++
QtGui4.dll!QListView::paintEvent(QPaintEvent * e=0x00000000001aad58) Line 951 + 0xc bytes C++
QtGui4.dll!QWidget::event(QEvent * event=0x0000000001d8f0d0) Line 8406 C++
QtGui4.dll!QFrame::event(QEvent * e=0x0000000000000000) Line 559 C++
QtGui4.dll!QAbstractItemView::viewportEvent(QEvent * event=0x0000000000000000) Line 1629 C++
QtCore4.dll!QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject * receiver=0x0000000001a8b0f0, QEvent * event=0x0000000001a8bdb0) Line 846 + 0xf bytes C++
QtGui4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x00000000001aaac0, QEvent * e=0x0000000054990000) Line 4458 + 0xf bytes C++
QtGui4.dll!QApplication::notify(QObject * receiver=0x0000000001a8b2b0, QEvent * e=0x00000000001aad58) Line 4427 + 0xe bytes C++
QtCore4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x0000000000000000, QEvent * event=0x0000000001a8b2b0) Line 731 + 0xf bytes C++
QtGui4.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x0000000001d4c620, const QRegion & rgn=
, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5494 C++
QtGui4.dll!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x0000000001d4c620, const QList<QObject *> & siblings=
, const QPoint & offset=
{...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5699 + 0x47 bytes C++QtGui4.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x0000000001d4c620, const QRegion & rgn={...}
, const QPoint & offset=
{...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5545 + 0x4b bytes C++QtGui4.dll!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x0000000001d4c620, const QList<QObject *> & siblings={...}
, int index=30818224, const QRegion & rgn=
{...}, const QPoint & offset={...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5699 + 0x47 bytes C++
QtGui4.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x0000000001d4c620, const QRegion & rgn=
, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5545 + 0x4b bytes C++
QtGui4.dll!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x0000000001d4c620, const QList<QObject *> & siblings=
, const QPoint & offset=
{...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5699 + 0x47 bytes C++QtGui4.dll!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x0000000001d4c620, const QList<QObject *> & siblings={...}
, int index=30685856, const QRegion & rgn=
{...}, const QPoint & offset={...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5686 + 0x43 bytes C++
QtGui4.dll!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x0000000001d4c620, const QList<QObject *> & siblings=
, const QPoint & offset=
{...}, int flags=4, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5686 + 0x43 bytes C++QtGui4.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x0000000000000018, const QRegion & rgn={...}
, const QPoint & offset=
{...}, int flags=5, QPainter * sharedPainter=0x0000000000000000, QWidgetBackingStore * backingStore=0x0000000001d760d0) Line 5545 + 0x4b bytes C++
QtGui4.dll!QWidgetBackingStore::sync() Line 1336 C++
QtGui4.dll!QWidgetPrivate::syncBackingStore() Line 1845 C++
QtGui4.dll!QWidget::event(QEvent * event=0x0000000054dbfd9d) Line 8553 C++
QtGui4.dll!QMainWindow::event(QEvent * event=0x00000000001af6a8) Line 1481 C++
QtGui4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x00000000001abe10, QEvent * e=0x0000000054990000) Line 4465 C++
QtGui4.dll!QApplication::notify(QObject * receiver=0x0000000001a8b2b0, QEvent * e=0x0000000001d74f60) Line 4427 + 0xe bytes C++
QtCore4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x0000000001a8b200, QEvent * event=0x0000000001a8b2b0) Line 731 + 0xf bytes C++
QtCore4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x0000000001a8b2f0, int event_type=0, QThreadData * data=0x0000000001a8b2b0) Line 1372 + 0x21 bytes C++
QtCore4.dll!qt_internal_proc(HWND__ * hwnd=0x0000000000000000, unsigned int message=0, unsigned __int64 wp=1753968, __int64 lp=0) Line 499 C++
user32.dll!000000007710c3c1()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!000000007710c60a()
QtCore4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x00000000001af5e8) Line 813 C++
QtGui4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000000024) Line 1170 + 0x11 bytes C++
QtCore4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000001a8b2b0) Line 201 + 0x41 bytes C++
QtCore4.dll!QCoreApplication::exec() Line 1008 + 0x17 bytes C++
temp1.exe!main(int argc=1, char * * argv=0x00000000001af760) Line 10 + 0x6 bytes C++
temp1.exe!WinMain(HINSTANCE__ * instance=0x00000000002451bb, HINSTANCE__ * prevInstance=0x0000000000000000, char * __formal=0x0000000000000000, int cmdShow=0) Line 135 C++
temp1.exe!__tmainCRTStartup() Line 547 + 0x25 bytes C
kernel32.dll!000000007720f56d()
ntdll.dll!0000000077342cc1()
If I set breakpoints and try to trace down, it seems like the problem may be here:
void QListView::paintEvent(QPaintEvent *e)
{
Q_D(QListView);
if (!d->itemDelegate)
return;
QStyleOptionViewItemV4 option = d->viewOptionsV4(); <-- CRASHES IN HERE
I don't know how much to trust memory, but the 'this' pointer seems reasonable inside the QListView, but when
I step into d->viewOptionsV4 it is NULL (but it didn't crash at d->itemDelegate, so maybe that is ok)
If I step forward, the actual crash happens here:
QStyleOptionViewItem QAbstractItemView::viewOptions() const
{
Q_D(const QAbstractItemView);
QStyleOptionViewItem option;
option.init(this);
(SNIP)
option.textElideMode = d->textElideMode;
option.rect = QRect(); <--- CRASHES AT THIS LINE
option.showDecorationSelected = style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, this);
return option;
}
But that doesn't make sense to me...
I Had a similar crash for 64-bit build of 4.7.0 (upgraded to 4.7.2 to see if it fixed the problem - it didn't).
Note that it doesn't happen in 32-bit builds or in 64-bit Debug build.
Also it doesn't happen in my 64-bit OSX build (not that that is likely to be relevant...)
Attachments
Issue Links
- is replaced by
-
QTBUG-11445 Qt apps fail to start when I build Qt 4.7 with win32-msvc2010 on Windows 7 x64
-
- Closed
-