On occasion my app begins to consume maximum CPU and the GUI becomes unresponsive. Maybe 1/50 attempts to reproduce this succeed.
Based on the high CPU usage it obviously is running (not blocked externally) but I'm not sure how to identify in the debugger where the execution is taking place.
The scenario of this problem goes like this:
- App starts
- User causes new modal window to open
- User works in this window for a while
- Eventually the window "freezes" (sometimes)
It is this last event which I am trying to debug.
I have followed the advice in Find infinite loop in progress? but when I break in the debugger it just lands on this line:
return f.ShowDialog();
I'm not sure why this is what the debugger considers to be the current executing line. I am not creating any threads.
Is there any way to debug this situation in the context of a modal window?
See Question&Answers more detail:os