We publish a Windows desktop application (built with Visual C++ 2013 with the v120_xp platform toolset) which worked fine on Windows 10, but we've started to receive reports from users who have installed the "Threshold 2" update that our app now fails to start, showing the following error message:
The application was unable to start correctly (0xc0000142). Click OK to close the application.
The error code is STATUS_DLL_INIT_FAILED, so we're presumably looking for a DLL failing to initialize.
We've made some attempts to troubleshoot this by observing the application starting up in a debugger, and using Process Monitor to see which DLLs are being loaded. The last DLL loaded (on a machine with Threshold 2 installed) is "davhlpr.dll". When we watch our application starting up on Windows 10 without Threshold 2, it starts without apparently loading that DLL at all. This suggests that the problem might be something to do with davhlpr.dll, but our code doesn't explicitly depend on that DLL and I have no idea what it is.
Has anyone else seen anything like this?
Does anyone have any ideas as to how we can troubleshoot this? After trying the debugger and Process Monitor, I'm out of ideas.
We eventually got to the bottom of this. The approach we took was as follows:
Long story short: it turns out that the failure was due to a Windows component called "fwbase.dll" (part of the Windows Firewall, apparently) which comdlg32.dll was attempting to load for some reason. Our application included a component named "fwBase.dll" (part of the AMD Framewave library), and the Windows loader presumably didn't bother trying to load fwbase.dll as it thought it was already loaded. Catastrophe followed shortly thereafter.
At this point, I'm not sure if this is a bug in Windows or what, but we resolved it by renaming fwBase.dll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With