-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hanging unless run under debugger #11
Comments
Hey @matelich I'm not able to reproduce the hanging behavior you described. Attached is a sample project of a WPF app using .NET 4.6.1 that opens the
No hanging or exception occurred. If you can provide me with a way of reproducing the hanging behavior, I'd be happy to investigate further. The relevant code in the sample attached: var dialog = new VistaFolderBrowserDialog
{
Description = "Please select a folder.",
UseDescriptionForTitle = true,
};
if (!VistaFolderBrowserDialog.IsVistaFolderDialogSupported)
{
MessageBox.Show(this,
"You are using an old Windows version. The regular folder browser dialog will open.",
"Sample folder browser dialog");
}
if (dialog.ShowDialog(this).GetValueOrDefault(false))
{
MessageBox.Show(this, "The selected folder was: " + dialog.SelectedPath,
"Sample folder browser dialog");
} |
Thanks for getting back to me quickly, @augustoproiete. I did try various repro steps to explore things. Going to try to add more usage into my other WPF applications to see if there's some common factor that might identify why it doesn't work. I threw some logging in and reproduced in my application, the hang is at |
seems related: If I enable
or:
or:
|
Samme issue here. When packaging the projekt according to I stripped the project to the bare minimum to provide a sample project, keeping the dialog spawning code and a button. Now it works in packaged application... |
@RumbleballTheReal Could you provide a reproducible example & corresponding |
Unfortunately/Luckily (depending on the pespective) its working today... If it happens again, I will try again to provide something. |
It's been a good while since I gave up on this, so I thought I'd give it another try. Since last time:
The sibling application works fine in debug and release. My original application still has the same behavior as previously, except Debug builds run properly outside the debugger. Tried running under dnSpy, after
Additionally, I had to disable the DisconnectedContext assistant to even get to use the application, and when I try to show the dialog, I get an InvalidApartmentStateChange. Doing a few more runs in the debugger, it's pretty clear that the WCF stuff is really not having a nice time. And the sibling application does not use the WCF stuff, so that's why it works. This application works fine under VS and standalone, not sure why dnSpy makes it so mad, or what's up with the COM stuff or how to make it happier with Ookii. |
When I try to use VistaFolderBrowserDialog in my WPF .NET 4.6.1 application, it hangs the application. If I run it under the debugger (in Debug or Release mode) it works great.
I've tried to repro this in the sample application by changing various calls and switching to the Nuget package, still works fine.
I've tried to simplify how I'm calling the VistaFolderBrowserDialog and copy/pasted the sample code to my application, still hangs.
Any thoughts as to why or how to track down the issue?
The text was updated successfully, but these errors were encountered: