I am desperately looking for a cause of crashes in my Qt-based Application.
After some observation I've detected, that alone opening a QFileDialog, which is standard windows file dialog, even without selecting any file, causes the application to crash after some minutes. It doesn't happen on all machines.
I've opened my application in dependency walker and the profiling revealed, that opening of file dialog loads tons of DLLs, which I don't need in my application - all the tools which hooked in windows shell. Among the others - TortoiseSVN, which even makes depends to freeze.
Is it possible in an application context to prevent other DLLs like codecs or shell-hooks to be loaded?
Is it at least possible to create a QFileDialog without loading all the tool hooked in windows?
This is definitely possible, but it's not trivial. What you have to do is insert an API hook on LoadLibrary
(and/or the Native API equivalent.) When your hook is called, you can examine the DLL filename and decide whether you want to pass it along to the real LoadLibrary
or return an error.
A couple places to find more info on API hooks:
Now all of that said, for your specific situation you may be better off just changing your TortoiseSVN settings. If you set the include/exclude paths in Tortoise to only look at directories on your computer that contain SVN repos, I bet this freeze will go away as long as you avoid those directories.