Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.1
-
None
-
Win XP, VS2005, static build
-
3e287de62f677dd0a88d2fa9299059025f2db546
Description
Using the non-native QFileDialog::getOpenFileName() and browsing to a folder, it crashes when retrieving a specific file or icon.
I could not see what exact file it cannot handle, but it's something in my WINDOWS folder.
There are two issues here; the first is that the HICON passed in to fromWinHICON(HICON icon) is null - this is a regression
and the second issue is that the the if check doesn't return if result is null - which is why it crashes.
qpixmap_win.cpp
QPixmap::fromWinHICON(), failed to GetIconInfo()
First-chance exception at 0x00635721 in standarddialogs.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00635721 in standarddialogs.exe: 0xC0000005: Access violation reading location 0x00000000.
> standarddialogs.exe!QPixmap::fromWinHICON(HICON__ * icon=0x00000000) Line 354 + 0x9 bytes C++ standarddialogs.exe!QFileIconProviderPrivate::getWinIcon(const QFileInfo & fileInfo=private={d=0x017648f8 }) Line 272 + 0x13 bytes C++ standarddialogs.exe!QFileIconProvider::icon(const QFileInfo & info=private={d=0x017648f8 }) Line 407 + 0x10 bytes C++ standarddialogs.exe!QFileInfoGatherer::getInfo(const QFileInfo & fileInfo=private={d=0x017648f8 }) Line 252 + 0x1d bytes C++ standarddialogs.exe!QFileSystemModelPrivate::_q_fileSystemChanged(const QString & path="C:/WINDOWS", const QList<QPair<QString,QFileInfo> > & updates=[247]({first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000000 } },{first=<Bad Ptr> second=private={d=0x00000 ,..., ...)) Line 1785 + 0x22 bytes C++ standarddialogs.exe!QFileSystemModel::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=5, void * * _a=0x02b8ff60) Line 99 + 0x1d bytes C++ standarddialogs.exe!QMetaObject::metacall(QObject * object=0x01703128, QMetaObject::Call cl=InvokeMetaMethod, int idx=29, void * * argv=0x02b8ff60) Line 238 C++ standarddialogs.exe!QMetaCallEvent::placeMetaCall(QObject * object=0x01703128) Line 561 + 0x19 bytes C++ standarddialogs.exe!QObject::event(QEvent * e=0x02b8fd30) Line 1242 + 0x14 bytes C++ standarddialogs.exe!QFileSystemModel::event(QEvent * event=0x02b8fd30) Line 1599 C++ standarddialogs.exe!QApplicationPrivate::notify_helper(QObject * receiver=0x01703128, QEvent * e=0x02b8fd30) Line 4318 + 0x11 bytes C++ standarddialogs.exe!QApplication::notify(QObject * receiver=0x01703128, QEvent * e=0x02b8fd30) Line 3722 + 0x10 bytes C++ standarddialogs.exe!QCoreApplication::notifyInternal(QObject * receiver=0x01703128, QEvent * event=0x02b8fd30) Line 704 + 0x15 bytes C++ standarddialogs.exe!QCoreApplication::sendEvent(QObject * receiver=0x01703128, QEvent * event=0x02b8fd30) Line 215 + 0x39 bytes C++ standarddialogs.exe!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x01637598) Line 1345 + 0xd bytes C++ standarddialogs.exe!qt_internal_proc(HWND__ * hwnd=0x00880922, unsigned int message=1025, unsigned int wp=0, long lp=0) Line 493 + 0x10 bytes C++ user32.dll!7e418734()