RE: Invoke (and other actions on a ListView) are hanging
- From: v-jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Mon, 22 Aug 2005 06:32:07 GMT
Hi Roy,
Thanks for your post.
Based on my understanding, you have met the hang problem on the
Control.Invoke calling.
For this issue, I think there are some things to look at:
1) Confirm all the controls are actually created on the UI thread. Make
sure someone isn't inadvertantly calling InvokeRequired prior to handle
creation, when it will always return false, then calling another method
which causes handle creation on the wrong thread. This is particularly
problematic if the creating thread then exits. We've seen hangs from this
before
2) Are they doing something on the Main thread that's causing a block,
thereby stopping hte message pump and looking like a deadlock?
Also, do you use multi-processor in your system? There is a known issue
related with Control.Invoke in .Net Framework1.1 of hang, please refer to:
"Bug Details: Control.Invoke hangs"
http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=5
3c5a200-e51b-47a0-9e71-34ccf6cbbf13
The hotfix for this issue is documented in the KB below:
"FIX: A Windows Forms-based application may stop responding when you make a
call to the Control.Invoke method in the .NET Framework 1.1 SP1"
http://support.microsoft.com/?kbid=896665
At last, without caring for the root cause, I think using
Control.BeginInvoke to replace Control.Invoke should resolve your issue.
You may give it a try.
Hope this helps
============================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.
- Follow-Ups:
- Re: Invoke (and other actions on a ListView) are hanging
- From: Roy Chastain
- Re: Invoke (and other actions on a ListView) are hanging
- Prev by Date: Re: KeyDown Event on Winform Datagrid
- Next by Date: RE: Red lines displayed in datagrid
- Previous by thread: RE: Invoke (and other actions on a ListView) are hanging
- Next by thread: Re: Invoke (and other actions on a ListView) are hanging
- Index(es):
Relevant Pages
|