Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exception when calling QFileDialog.exec()
Forum Updated to NodeBB v4.3 + New Features

Exception when calling QFileDialog.exec()

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 508 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    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

    JonBJ 2 Replies Last reply
    0
    • PerdrixP Perdrix

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Perdrix
      I assume you are using the native dialog. You might just try setting QFileDialog::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();
      
      PerdrixP 1 Reply Last reply
      0
      • JonBJ JonB

        @Perdrix
        I assume you are using the native dialog. You might just try setting QFileDialog::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();
        
        PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        @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.

        Axel SpoerlA 1 Reply Last reply
        0
        • PerdrixP Perdrix

          @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.

          Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #4

          @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

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          0
          • PerdrixP Perdrix

            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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @Perdrix said in Exception when calling QFileDialog.exec():

            OldNewExplorer64.dll!00007ffbb99e23a4() Unknown
            shell32.dll!DUI_LoadUIFileFromResources() Unknown

            I 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?

            PerdrixP 1 Reply Last reply
            1
            • JonBJ JonB

              @Perdrix said in Exception when calling QFileDialog.exec():

              OldNewExplorer64.dll!00007ffbb99e23a4() Unknown
              shell32.dll!DUI_LoadUIFileFromResources() Unknown

              I 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?

              PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote on last edited by
              #6

              @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

              JonBJ 1 Reply Last reply
              0
              • PerdrixP Perdrix

                @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

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved