See the question and my original answer on StackOverflow

In Windows, when an application fails in a strange way, one idea is to check what are the .dll loaded in that application's process and try to spot anything that looks strange.

This is especially true when you use the Common Dialog (Open, Save As) provider by the Windows Shell since doing that potentially bring in a lot of 3rd parties .dll, loading them in the process.

One of the best tool to check that is Process Explorer from Sysinternals.

Here is a screenshot that shows external .dll opened in standard Notepad just because I used the File Open dialog box. We can see Intel's extensions, Adobe extensions, OneDrive, etc.

enter image description here

It was not the issue here, but still, it apparently helped spot the problem.