I have a UI thread not responding also.
I have an Async operation that I am processing a long running SQL script
in ADO.Net. I am executing the Command asynchronous and hooking the
SqlCommand.StatementCompleted. I then use AsyncOperation to post events
back to the UI thread. The UI thread then updates a progress bar and
multi-line textbox. I then send a Windows Message to auto scroll the
textbox to the bottom. When the script stops running the UI comes back
to life.
The problem:
Sometimes when the user scrolls the textbox the UI thread locks-up.
What I’ve tried:
I have done extensive testing on my Async class on the execution path,
events and the logic.
The trace statements show the events firing, and being fully handled.
I tried commenting out the auto scroll, but that did not fix it.
What I think the problem is:
Honestly I don’t know.
The trace statements show everything is working correctly and executing
on the correct thread.
Is it possible to overload the application with too many events so the
UI can’t update?
The size of the project makes it very difficult in posting some examples
(Main form 900loc, SQL processor 800loc & Async base 500loc). So I am
just looking for some ideas on how to fix this problem.
Thanks
sprayer
*** Sent via Developersdex http://www.developersdex.com ***