Exception when calling QFileDialog.exec()
-
The exception is deep inside the Windows file open dialog code.
The call stack just after the exception looks like this:
ntdll.dll!KiUserExceptionDispatch() Unknown ntdll.dll!RtlImageNtHeaderEx() Unknown ntdll.dll!RtlImageNtHeader() Unknown ntdll.dll!LdrpGetAlternateResourceModuleHandleEx() Unknown ntdll.dll!LdrpAccessResourceData() Unknown KERNELBASE.dll!LoadResource() Unknown OldNewExplorer64.dll!00007ffbb99e23a4() Unknown shell32.dll!DUI_LoadUIFileFromResources() Unknown shell32.dll!CCommonLayoutDefinition::GetLayoutDefinition() Unknown shell32.dll!CDUIViewFrame::IsLayoutSupported(struct IFrameLayoutDefinition *) Unknown shell32.dll!CExplorerBrowser::_SwitchView() Unknown shell32.dll!CExplorerBrowser::_BrowseToView(struct _ITEMIDLIST_ABSOLUTE const *,int) Unknown shell32.dll!CExplorerBrowser::_BrowseObjectInternal() Unknown shell32.dll!CExplorerBrowser::_OnBrowseObject(void) Unknown shell32.dll!CExplorerBrowser::BrowseObject() Unknown comdlg32.dll!CFileOpenSave::_JumpToInitialLocation() Unknown comdlg32.dll!CFileOpenSave::_InitOpenSaveDialog(struct HWND__ *) Unknown comdlg32.dll!CFileOpenSave::s_OpenSaveDlgProc(struct HWND__ *,unsigned int,unsigned __int64,__int64) Unknown user32.dll!UserCallDlgProcCheckWow() Unknown user32.dll!DefDlgProcWorker() Unknown user32.dll!DefDlgProcW() Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!SendMessageWorker(struct tagWND *,unsigned int,unsigned __int64,__int64,int) Unknown user32.dll!InternalCreateDialog() Unknown user32.dll!InternalDialogBox() Unknown user32.dll!DialogBoxIndirectParamAorW() Unknown user32.dll!DialogBoxIndirectParamW() Unknown comdlg32.dll!<lambda>(void)() Unknown comdlg32.dll!CFileOpenSave::Show(struct HWND__ *) Unknown qwindows.dll!00007ffb94e84a0d() Unknown qwindows.dll!00007ffb94e85380() Unknown Qt6Widgets.dll!00007ffb63286167() Unknown DeepSkyStacker.exe!DSS::StackingDlg::onAddImages(PICTURETYPE type) Line 1651 C++ DeepSkyStacker.exe!DSS::StackingDlg::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 495 C++
has anyone seen the like before?
Thanks
David -
The exception is deep inside the Windows file open dialog code.
The call stack just after the exception looks like this:
ntdll.dll!KiUserExceptionDispatch() Unknown ntdll.dll!RtlImageNtHeaderEx() Unknown ntdll.dll!RtlImageNtHeader() Unknown ntdll.dll!LdrpGetAlternateResourceModuleHandleEx() Unknown ntdll.dll!LdrpAccessResourceData() Unknown KERNELBASE.dll!LoadResource() Unknown OldNewExplorer64.dll!00007ffbb99e23a4() Unknown shell32.dll!DUI_LoadUIFileFromResources() Unknown shell32.dll!CCommonLayoutDefinition::GetLayoutDefinition() Unknown shell32.dll!CDUIViewFrame::IsLayoutSupported(struct IFrameLayoutDefinition *) Unknown shell32.dll!CExplorerBrowser::_SwitchView() Unknown shell32.dll!CExplorerBrowser::_BrowseToView(struct _ITEMIDLIST_ABSOLUTE const *,int) Unknown shell32.dll!CExplorerBrowser::_BrowseObjectInternal() Unknown shell32.dll!CExplorerBrowser::_OnBrowseObject(void) Unknown shell32.dll!CExplorerBrowser::BrowseObject() Unknown comdlg32.dll!CFileOpenSave::_JumpToInitialLocation() Unknown comdlg32.dll!CFileOpenSave::_InitOpenSaveDialog(struct HWND__ *) Unknown comdlg32.dll!CFileOpenSave::s_OpenSaveDlgProc(struct HWND__ *,unsigned int,unsigned __int64,__int64) Unknown user32.dll!UserCallDlgProcCheckWow() Unknown user32.dll!DefDlgProcWorker() Unknown user32.dll!DefDlgProcW() Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!SendMessageWorker(struct tagWND *,unsigned int,unsigned __int64,__int64,int) Unknown user32.dll!InternalCreateDialog() Unknown user32.dll!InternalDialogBox() Unknown user32.dll!DialogBoxIndirectParamAorW() Unknown user32.dll!DialogBoxIndirectParamW() Unknown comdlg32.dll!<lambda>(void)() Unknown comdlg32.dll!CFileOpenSave::Show(struct HWND__ *) Unknown qwindows.dll!00007ffb94e84a0d() Unknown qwindows.dll!00007ffb94e85380() Unknown Qt6Widgets.dll!00007ffb63286167() Unknown DeepSkyStacker.exe!DSS::StackingDlg::onAddImages(PICTURETYPE type) Line 1651 C++ DeepSkyStacker.exe!DSS::StackingDlg::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 495 C++
has anyone seen the like before?
Thanks
David@Perdrix
I assume you are using the native dialog. You might just try settingQFileDialog::DontUseNativeDialog
to ensure that works OK.Have you tried this in an absolutely minimal application, something like:
QApplication a(argc, argv); QFileDialog fd; fd.exec(); return a.exec();
-
@Perdrix
I assume you are using the native dialog. You might just try settingQFileDialog::DontUseNativeDialog
to ensure that works OK.Have you tried this in an absolutely minimal application, something like:
QApplication a(argc, argv); QFileDialog fd; fd.exec(); return a.exec();
@JonB This isn't on my system, it is the call stack from a dump file taken using Task Manager when the application I develop was being run on a user's system. The application is hung at this point in a deadly embrace as my exception handling code was trying to do a stack walk.
-
@JonB This isn't on my system, it is the call stack from a dump file taken using Task Manager when the application I develop was being run on a user's system. The application is hung at this point in a deadly embrace as my exception handling code was trying to do a stack walk.
@Perdrix
Hi David,
As @JonB said, forcing usage of the Qt file dialog will probably solve the issue or at least shed more light on it.
That said: I remember a windows native file dialog crash in a user setup that took me forever to hunt down. It was on a laptop that was used sometimes with a monitor attached and sometimes just with the laptop screen. The native file dialog tried to remember its geometry. When the monitor based geometry was attempted to be restored on the laptop screen, it was well out of bounds. Booom. Deleting those settings solved the problem, but I don’t remember where they were. It’s been a while and I am not a windows person.
Cheers
Axel -
The exception is deep inside the Windows file open dialog code.
The call stack just after the exception looks like this:
ntdll.dll!KiUserExceptionDispatch() Unknown ntdll.dll!RtlImageNtHeaderEx() Unknown ntdll.dll!RtlImageNtHeader() Unknown ntdll.dll!LdrpGetAlternateResourceModuleHandleEx() Unknown ntdll.dll!LdrpAccessResourceData() Unknown KERNELBASE.dll!LoadResource() Unknown OldNewExplorer64.dll!00007ffbb99e23a4() Unknown shell32.dll!DUI_LoadUIFileFromResources() Unknown shell32.dll!CCommonLayoutDefinition::GetLayoutDefinition() Unknown shell32.dll!CDUIViewFrame::IsLayoutSupported(struct IFrameLayoutDefinition *) Unknown shell32.dll!CExplorerBrowser::_SwitchView() Unknown shell32.dll!CExplorerBrowser::_BrowseToView(struct _ITEMIDLIST_ABSOLUTE const *,int) Unknown shell32.dll!CExplorerBrowser::_BrowseObjectInternal() Unknown shell32.dll!CExplorerBrowser::_OnBrowseObject(void) Unknown shell32.dll!CExplorerBrowser::BrowseObject() Unknown comdlg32.dll!CFileOpenSave::_JumpToInitialLocation() Unknown comdlg32.dll!CFileOpenSave::_InitOpenSaveDialog(struct HWND__ *) Unknown comdlg32.dll!CFileOpenSave::s_OpenSaveDlgProc(struct HWND__ *,unsigned int,unsigned __int64,__int64) Unknown user32.dll!UserCallDlgProcCheckWow() Unknown user32.dll!DefDlgProcWorker() Unknown user32.dll!DefDlgProcW() Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!SendMessageWorker(struct tagWND *,unsigned int,unsigned __int64,__int64,int) Unknown user32.dll!InternalCreateDialog() Unknown user32.dll!InternalDialogBox() Unknown user32.dll!DialogBoxIndirectParamAorW() Unknown user32.dll!DialogBoxIndirectParamW() Unknown comdlg32.dll!<lambda>(void)() Unknown comdlg32.dll!CFileOpenSave::Show(struct HWND__ *) Unknown qwindows.dll!00007ffb94e84a0d() Unknown qwindows.dll!00007ffb94e85380() Unknown Qt6Widgets.dll!00007ffb63286167() Unknown DeepSkyStacker.exe!DSS::StackingDlg::onAddImages(PICTURETYPE type) Line 1651 C++ DeepSkyStacker.exe!DSS::StackingDlg::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 495 C++
has anyone seen the like before?
Thanks
David@Perdrix said in Exception when calling QFileDialog.exec():
OldNewExplorer64.dll!00007ffbb99e23a4() Unknown
shell32.dll!DUI_LoadUIFileFromResources() UnknownI think this a third-party extension installed on that guy's system.
See https://social.msdn.microsoft.com/Forums/vstudio/en-US/e893bf8e-3ef6-45ac-8da3-6f067fbff804/starting-c-program-crashes-only-with-msvc?forum=visualstudiogeneral --- it has the same stack trace crash as yours!This dll is not intentionally loaded but comes in as a system dll the moment I open a FileDialog (via IFileDialog).
Solution there:
Since the problem only surfaces when the OldNewExplorer shell extension is loaded into your process I suggest you take up the issue with the author of that software.
This is why Windows can be a nightmare! :)
Ask your user if they have this extension and to try uninstalling/disabling it?
-
@Perdrix said in Exception when calling QFileDialog.exec():
OldNewExplorer64.dll!00007ffbb99e23a4() Unknown
shell32.dll!DUI_LoadUIFileFromResources() UnknownI think this a third-party extension installed on that guy's system.
See https://social.msdn.microsoft.com/Forums/vstudio/en-US/e893bf8e-3ef6-45ac-8da3-6f067fbff804/starting-c-program-crashes-only-with-msvc?forum=visualstudiogeneral --- it has the same stack trace crash as yours!This dll is not intentionally loaded but comes in as a system dll the moment I open a FileDialog (via IFileDialog).
Solution there:
Since the problem only surfaces when the OldNewExplorer shell extension is loaded into your process I suggest you take up the issue with the author of that software.
This is why Windows can be a nightmare! :)
Ask your user if they have this extension and to try uninstalling/disabling it?
-
@JonB Thank you that was very helpful. Sadly the user says:
"Sorry, I have given up with this. I tested the software on three separate computers. Same result. I have deleted the program now, I don't have any intention to do more testing."
Helpful fellow
@Perdrix
It looks like OldNewExplorer is this software: https://www.majorgeeks.com/files/details/oldnewexplorer.html.
Like I said, I think you have a way forward: ask your user to uninstall it to verify that your Qt code then works OK.
And/or install it for yourself to see if you can replicate the bug.
Then figure whether it can be made to work in whatever situation, or whether it cannot be used with whatever Qt is doing.