473,513 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FolderBrowserDialog hangs the application

I have narrowed a problem down to a simple example. A form with two
buttons. One EXIT and one FBD. The exit button does an "END" to end the
application. The FBD button does a FolderBrowserDialog and nothing else.

When I start the application and hit EXIT everything works fine. However if
it display the FBD box (even if I don't pick a folder and immediately hit
cancel) and then try to exit one of two things happens. Either (1) the
program hangs and never exits or (2) the program 'seems' to exit but it is
still running (as seen in the tasklist), and in both cases the program has
to be killed from the tasklist.

Researching this issue, I found that there were problems associated with FBD
where paths were > 128 chars, and also if the threading model was not STA.
Both of these issues do not apply here. (my thread model is STA, and I don't
even have to pick a folder for this to happen).

I am running .NET 1.1 and my system.windows.forms.dll is ver 1.1.4322.2032.

Can anybody confirm this bug, or know of a workaround? Right now, I have
to skip the FBD entirely, and have the user just type in a folder path
(Ugh!).

Thanks for any help.
John
Nov 21 '05 #1
12 5830
Some additional info... this is the second time I'm posting about this
issue... the first time I tried rebooting and it seemed to work. This time
it works once after the reboot, then fails again.

I used the SysInternals process explorer to try and get some add'l info.
After the application hangs, processexplorer says that there is still 1
thread running. The info it gave was 0x7c810867 followed by
NTdll.dll!RtlConvertUiListToApiList+0x276 for the thread. When I hit the
"module" button in process explorer it caused a "Properties window" (like
when you right click a directory and hit properties) to pop up against one
of my directories! Now that is weird.

I'm in no way an windows xp internals expert but I was hoping that this
might make some sense to somebody out there.

I'm at a loss here. I can't imagine that my PC configuration is so very
different that I'm seeing a problem that nobody else is seeing.

If anybody has any ideas, I would greatly appreciate them.

Thanks, John

"JohnR" <Jo******@hotmail.com> wrote in message
news:WgoQe.2198$LK.1556@trndny09...
I have narrowed a problem down to a simple example. A form with two
buttons. One EXIT and one FBD. The exit button does an "END" to end the
application. The FBD button does a FolderBrowserDialog and nothing else.

When I start the application and hit EXIT everything works fine. However
if it display the FBD box (even if I don't pick a folder and immediately
hit cancel) and then try to exit one of two things happens. Either (1)
the program hangs and never exits or (2) the program 'seems' to exit but
it is still running (as seen in the tasklist), and in both cases the
program has to be killed from the tasklist.

Researching this issue, I found that there were problems associated with
FBD where paths were > 128 chars, and also if the threading model was not
STA. Both of these issues do not apply here. (my thread model is STA, and
I don't even have to pick a folder for this to happen).

I am running .NET 1.1 and my system.windows.forms.dll is ver
1.1.4322.2032.

Can anybody confirm this bug, or know of a workaround? Right now, I have
to skip the FBD entirely, and have the user just type in a folder path
(Ugh!).

Thanks for any help.
John

Nov 21 '05 #2
John,

This is a known bug fixed in Net 1.1 SP1.

I hope this helps,

Cor
Nov 21 '05 #3
Some more add'l info...

I use PowerDesk as an alternative to windows explorer. When I started my
application from within powerdesk I could reproduce the error pretty
reliably. When I stopped powerdesk and started that application from
windows explorer I could not reproduce the problem. Hmmmm. Maybe an
interaction between powerdesk (a fairly old application), the windows
ntdll.dll!RtlConvertUiListToApiList routine and the folderbrowserdialog
routines. Hmmmm. Back to the web for more research...

Doing a search on "ntdll.dll!RtlConvertUiListToApiList" in google led me to
a forum article that claimed that this routine was somehow being interacted
with by some of the Sysinternal's ProcessExplorer processes. (I run the
sysinternal process explorer virtually all the time). When I stopped
process explorer and tried again, it did indeed seem to work fine. Hmmmm.
Now I fired up Powerdesk again, and started the application from there
(still no process explorer running) and I could not reproduce the error...
Well what the heck, I fired up sysinternals process explorer and then fired
off the application from powerdesk and now I could not reproduce the error
(this was the config that I could reliably reproduce it before).

During the Google search I read that FolderBrowserDialog had a known problem
that was fixed in sp1. It had something to do with it overwriting it's
heap. Well, I found a OpenRCE trace on the win32
NTDLL->RtlConvertUiListToApiList calls and guess what routines it calls...
RtlAllocateHeap and RtlFreeHeap. Remember that when my application was in
the hang state the only thread running was the RtlConvertUiListToApiList,
and now it seems that this routine interacts with the heap. Maybe
Microsoft fixed one problem with the heap and missed another? Purely
speculation on my part, but it's pretty funny that the one thread left
running called the heap routines, and MS said that the heap was the problem
that caused the hang when the folder was > 128 chars. Coincidence? Maybe,
maybe not.

Anyway that's all I was able to find out. So, while I'm fairly sure that
one or both of PowerDesk and Sysinternals Process Explorer are somehow
interacting with the FolderBrowserDialog routine, I can't put my finger on
exactly what is happening.

Given this, can anybody shed some additional light on this?

Thanks, John

"JohnR" <Jo******@hotmail.com> wrote in message
news:BKoQe.1308$Re1.974@trndny04...
Some additional info... this is the second time I'm posting about this
issue... the first time I tried rebooting and it seemed to work. This
time it works once after the reboot, then fails again.

I used the SysInternals process explorer to try and get some add'l info.
After the application hangs, processexplorer says that there is still 1
thread running. The info it gave was 0x7c810867 followed by
NTdll.dll!RtlConvertUiListToApiList+0x276 for the thread. When I hit the
"module" button in process explorer it caused a "Properties window" (like
when you right click a directory and hit properties) to pop up against one
of my directories! Now that is weird.

I'm in no way an windows xp internals expert but I was hoping that this
might make some sense to somebody out there.

I'm at a loss here. I can't imagine that my PC configuration is so very
different that I'm seeing a problem that nobody else is seeing.

If anybody has any ideas, I would greatly appreciate them.

Thanks, John

"JohnR" <Jo******@hotmail.com> wrote in message
news:WgoQe.2198$LK.1556@trndny09...
I have narrowed a problem down to a simple example. A form with two
buttons. One EXIT and one FBD. The exit button does an "END" to end the
application. The FBD button does a FolderBrowserDialog and nothing else.

When I start the application and hit EXIT everything works fine. However
if it display the FBD box (even if I don't pick a folder and immediately
hit cancel) and then try to exit one of two things happens. Either (1)
the program hangs and never exits or (2) the program 'seems' to exit but
it is still running (as seen in the tasklist), and in both cases the
program has to be killed from the tasklist.

Researching this issue, I found that there were problems associated with
FBD where paths were > 128 chars, and also if the threading model was not
STA. Both of these issues do not apply here. (my thread model is STA, and
I don't even have to pick a folder for this to happen).

I am running .NET 1.1 and my system.windows.forms.dll is ver
1.1.4322.2032.

Can anybody confirm this bug, or know of a workaround? Right now, I
have to skip the FBD entirely, and have the user just type in a folder
path (Ugh!).

Thanks for any help.
John


Nov 21 '05 #4
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
This is a known bug fixed in Net 1.1 SP1.


The "path longer than 128 characters" problem has been fixed, but I doubt
that this is the reason for the issue the OP is experiencing.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
You are right, I readed wrong.

Cor
Nov 21 '05 #6
Some more add'l info...

I use PowerDesk as an alternative to windows explorer. When I started my
application from within powerdesk I could reproduce the error pretty
reliably. When I stopped powerdesk and started that application from
windows explorer I could not reproduce the problem. Hmmmm. Maybe an
interaction between powerdesk (a fairly old application), the windows
ntdll.dll!RtlConvertUiListToApiList routine and the folderbrowserdialog
routines. Hmmmm. Back to the web for more research...

Doing a search on "ntdll.dll!RtlConvertUiListToApiList" in google led me to
a forum article that claimed that this routine was somehow being interacted
with by some of the Sysinternal's ProcessExplorer processes. (I run the
sysinternal process explorer virtually all the time). When I stopped
process explorer and tried again, it did indeed seem to work fine. Hmmmm.
Now I fired up Powerdesk again, and started the application from there
(still no process explorer running) and I could not reproduce the error...
Well what the heck, I fired up sysinternals process explorer and then fired
off the application from powerdesk and now I could not reproduce the error
(this was the config that I could reliably reproduce it before).

During the Google search I read that FolderBrowserDialog had a known problem
that was fixed in sp1. It had something to do with it overwriting it's
heap. Well, I found a OpenRCE trace on the win32
NTDLL->RtlConvertUiListToApiList calls and guess what routines it calls...
RtlAllocateHeap and RtlFreeHeap. Remember that when my application was in
the hang state the only thread running was the RtlConvertUiListToApiList,
and now it seems that this routine interacts with the heap. Maybe
Microsoft fixed one problem with the heap and missed another? Purely
speculation on my part, but it's pretty funny that the one thread left
running called the heap routines, and MS said that the heap was the problem
that caused the hang when the folder was > 128 chars. Coincidence? Maybe,
maybe not.

Anyway that's all I was able to find out. So, while I'm fairly sure that
one or both of PowerDesk and Sysinternals Process Explorer are somehow
interacting with the FolderBrowserDialog routine, I can't put my finger on
exactly what is happening.

Given this, can anybody shed some additional light on this?

Thanks, John

"JohnR" <Jo******@hotmail.com> wrote in message
news:BKoQe.1308$Re1.974@trndny04...
Some additional info... this is the second time I'm posting about this
issue... the first time I tried rebooting and it seemed to work. This
time it works once after the reboot, then fails again.

I used the SysInternals process explorer to try and get some add'l info.
After the application hangs, processexplorer says that there is still 1
thread running. The info it gave was 0x7c810867 followed by
NTdll.dll!RtlConvertUiListToApiList+0x276 for the thread. When I hit the
"module" button in process explorer it caused a "Properties window" (like
when you right click a directory and hit properties) to pop up against one
of my directories! Now that is weird.

I'm in no way an windows xp internals expert but I was hoping that this
might make some sense to somebody out there.

I'm at a loss here. I can't imagine that my PC configuration is so very
different that I'm seeing a problem that nobody else is seeing.

If anybody has any ideas, I would greatly appreciate them.

Thanks, John

"JohnR" <Jo******@hotmail.com> wrote in message
news:WgoQe.2198$LK.1556@trndny09...
I have narrowed a problem down to a simple example. A form with two
buttons. One EXIT and one FBD. The exit button does an "END" to end the
application. The FBD button does a FolderBrowserDialog and nothing else.

When I start the application and hit EXIT everything works fine. However
if it display the FBD box (even if I don't pick a folder and immediately
hit cancel) and then try to exit one of two things happens. Either (1)
the program hangs and never exits or (2) the program 'seems' to exit but
it is still running (as seen in the tasklist), and in both cases the
program has to be killed from the tasklist.

Researching this issue, I found that there were problems associated with
FBD where paths were > 128 chars, and also if the threading model was not
STA. Both of these issues do not apply here. (my thread model is STA, and
I don't even have to pick a folder for this to happen).

I am running .NET 1.1 and my system.windows.forms.dll is ver
1.1.4322.2032.

Can anybody confirm this bug, or know of a workaround? Right now, I
have to skip the FBD entirely, and have the user just type in a folder
path (Ugh!).

Thanks for any help.
John


Nov 21 '05 #7
John,

I assume that the problem is simple enough to show us some sample code to
simulate your problem?.

Cor
Nov 21 '05 #8
John,

I assume that the problem is simple enough to show us some sample code to
simulate your problem?.

Cor
Nov 21 '05 #9
Hi Cor,

Good to talk to you again... Yes the code is very simple, the problem is
trying to determine why it's hanging (see my previous post for what I have
found out so far). Whole program is 2 buttons on a form. One button exits,
and one does a FolderBrowserDialog.... that's it.

Here it is:
Public Class Form1

Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code " <snip>

#End Region

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExit.Click

End

End Sub

Private Sub btnDoFBD_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDoFBD.Click

Dim fbd As New FolderBrowserDialog

fbd.ShowDialog()

fbd.Dispose() 'this stmt does not make any difference as to the program
hanging on the "end" stmt

End Sub

End Class

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
John,

I assume that the problem is simple enough to show us some sample code to
simulate your problem?.

Cor

Nov 21 '05 #10
John,

You seriously do an "End".

I tried your code and could not get the error, however using "End" is
something you should never do.

End *kills* your program in the middle. Use a "me.close" instead of that.

Cor
Nov 21 '05 #11
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
I tried your code and could not get the error


Same on my machine (Windows XP Professional SP2, .NET 1.1 SP1).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #12
Hi Cor and Herfried,

Thanks for all the effort you put in. Realistically, I didn't expect it
to fail on you machines, as I believe the problem has to do with either
PowerDesk or Sysinternals Process Explorer (see my post appended with "-more
info" where I explain what is happening). I think it may be a leftover heap
corruption bug in the FolderBrowserDialog code.

John
PS, no I really don't use END, I used it in the example because it was
SUPPOSED to kill everything.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:u4*************@TK2MSFTNGP15.phx.gbl...
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
I tried your code and could not get the error


Same on my machine (Windows XP Professional SP2, .NET 1.1 SP1).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1850
by: Anja | last post by:
I have installed the new Visual Studio 2003 and implemented the FolderBrowserDialog. Everything works fine, if I open the FolderBrowserDialog before opening a Database Connection. If I open...
0
2807
by: R A | last post by:
Hi, I use FolderBrowserDialog in my c# windows forms project. It was working with no issues, but right now the dialog shows but I can't see any directories selection. I can see the buttons at...
9
2413
by: hhh12347 | last post by:
FolderBrowserDialog crashes on my Windows 2000 computer. Here is a C# test program: using System; using System.Windows.Forms; public class TestForm : Form { FolderBrowserDialog...
0
1561
by: Tommy Clark | last post by:
I am using Microsoft Development Environment 2003 Version 7.1.3088 and .NET Framework 1.1 Version 1.1.4322 SP1. I have an MFC application that we have ported to .NET and have added the...
4
408
by: JohnR | last post by:
I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a...
5
7331
by: Scott M. Lyon | last post by:
My application (a VB.NET 2003 WinApp) currently has first an OpenFileDialog (asking for an input file to the process I'm working on), and then once the user selects that, it brings up a...
11
2988
by: Grumpy Aero Guy | last post by:
I have created an app that makes use of the FolderBrowserDialog. Upon building the app, installing and running it, and invoking the form using the dialog, it hangs upon folder selection and goes...
0
2826
by: mohit | last post by:
Hello, I am running my windows application on a 64 bit machine with MS .NET Framework 2.0 (x64). When using the FolderBrowserDialog an unhandled exception was coming time and again. After...
6
1963
by: chrisknapp | last post by:
I'm learning VB and am making an application where I need a user to be able to choose which folder his files are located in. The folder path chosen will be stored as a string for later use in the...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.