1

If we run the program as .exe, it's working totally fine. tried it with 4 different computer with VS 2015, 3 of them not working in debug mode, every computer has the same VS 2015 with community license. We have gone through this link, but there is no exact solution indicated. It's been six years of the questions and still no solution.

This is WinForms application and here is the code execute when a button is clicked:

   `folderBrowserDialog1.ShowDialog();
    txtCount.Text = folderBrowserDialog1.SelectedPath;`
halfer
  • 19,824
  • 17
  • 99
  • 186
sbiswas
  • 21
  • 4
  • What is the exception you get? so you expect us to guess it? – Crispy Holiday Sep 29 '17 at 14:35
  • The program doesn't throw any exception instead, it just stopped the execution. Here is the debug output 'has exited with code 1073741855 (0x4000001f).' with the window message 'vhost32.exe has stopped working, windows will close the program and notify you if a solution is available'. – sbiswas Sep 29 '17 at 14:45
  • 1
    It is a breakpoint exception, it is getting raised in code that the CLR does not know about. In general a problem with the shell dialogs, they load shell extensions into your program and there are a lot of bad ones out there. Enabling unmanaged debugging can give insight in which DLL is the evil one, the Output window shows them getting loaded and with some luck you now get a breakpoint and the Stack Trace window points at the troublemaker. Use Sysinternals' Autoruns utility to clean up the machine. – Hans Passant Sep 29 '17 at 15:01
  • @HansPassant, unfortunately, we can't do that as we don't have the permission. I already requested the network admin for the permission. Just to let you know one of my colleagues' workstation working with same permission and software, but all other 3 has the same problem as me! Thank you! – sbiswas Sep 29 '17 at 15:22
  • Do you have tried create a simple WinForm that only contains above code to open a FolderBrowserDialog? If new project also has this issue, please import VS settings file which export from your colleagues's workstation to check whether this problem caused by VS or machine environment. – Weiwei Oct 02 '17 at 02:44
  • @Wendy-MSFT tried the first part before and it didn't work. Just did the second part by importing the settings from my colleague workstation and again didn't work. We have tried cleaning up the machine as well, but no luck. – sbiswas Oct 02 '17 at 14:05
  • @sbiswas Since new project and new machine installation still has this issue, I suggest you compare your machine hardware to check whether there has any difference with your colleague. And also please check the operating system, whether they are in the same version and the same bit. – Weiwei Oct 03 '17 at 04:51
  • @wendy tried my best to find any difference, but everything seems identical. Also, run the Sysinternals tools to see if there are 'Wuala' shell extension as reported [here](https://stackoverflow.com/questions/7104569/vshost32-exe-has-stopped-working-when-i-call-the-showdialog-method-of-openfiledi?noredirect=1&lq=1), but still no luck as in my system there was no Wuala. Mysterious problem with no quick solution! – sbiswas Oct 03 '17 at 17:06
  • @sbiswas Do you have checked the Windows Event Viewer? Please check whether there has any error log information about your application. In addition, please open Exception Settings window from Debug menu -> Windows to check all options of Common Language Runtime Exceptions and then re-debug your application, whether there has any exception thrown? – Weiwei Oct 04 '17 at 02:06
  • @Wendy-MSFT Just checked the event viewer, no error or warning logs. Checked all the options of CLR debugging and still no exception thrown, instead just stopped the vhost32.exe errors. – sbiswas Oct 04 '17 at 15:00
  • Uncheck the Enable the Visual Studio Hosting Process checkbox under project property, how about the result? Not real debug your app, just run your app using "start without debugging(Ctrl+F5)", do you get the same issue? I met this error before which was related to the code or the host process property. – Jack Zhai Oct 10 '17 at 03:16

0 Answers0