views:

23

answers:

1

Hi! Check out following scenario:

A User control which contain two combo boxes...

First combo box contain list of States and Second combo box contain list of Cities. When you select a state the second combo box will contain list of cities using a LINQ query. When you select another state in first combo box the second combo box's items clear and refill. but when you want to open it DING DING! application gets HANG and your CPU will be 100% full!!!

unfortunately no Exception occurs during this operations and i don't know what to do!

NOTE: I am sure my LINQ operations and other operations work good and there is no infinite loop or dirty code or something else!

Any idea or such problem?

A: 

Break into the debugger and look at the call stacks of your threads. Are they executing in a loop or waiting on some synchronization? If you resume execution and break again a short time later, are they still executing in the same loop? If your application is pegging the CPU, then there is code somewhere in there that's doing a lot of work. You just need to figure out where that is.

Chris Schmich