unknwon beheavior-100 percent cpu usage. Please help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

has anyone had a issue like this...

My application (VB .net) starts using about 20% from cpu, and slowly
increase the cpu usage to 100%.

I need to know any factor that hs influence on cpu usage...

My app, needs to show rows in a datagrid, and refresh this data throught a
timing, and I use the System.Windows.Forms.Timer object. I suspect threads
are not been deallocated or disposed after I kill them explicity.. Actually I
make use of four paralell threads...

Thanks..
 
-- seen that happen when your program gets caught in a loop that it never
exits -- put some breakpoints in there or messageboxes and debug.
 
hmedinapy a écrit :
has anyone had a issue like this...

My application (VB .net) starts using about 20% from cpu, and slowly
increase the cpu usage to 100%.

I need to know any factor that hs influence on cpu usage...

My app, needs to show rows in a datagrid, and refresh this data throught a
timing, and I use the System.Windows.Forms.Timer object. I suspect threads
are not been deallocated or disposed after I kill them explicity.. Actually I
make use of four paralell threads...

When you get that behavior :
- Use Process Explorer (from www.sysinternals.com) to check wich thread
is consuming CPU time.
- Break into the debugger, swith to the faulty thread and look what it
is doing.

Arnaud
MVP - VC
 
hmedinapy a écrit :


When you get that behavior :
- Use Process Explorer (from www.sysinternals.com) to check wich thread
is consuming CPU time.
- Break into the debugger, swith to the faulty thread and look what it
is doing.

Arnaud
MVP - VC
Thank you very much for you reply Anaud.

I followed you steps, and I saw that my app uses about 26 threads,
eventually creates some new threats and then deletes them.

I want to make myself clear.

When I say "Actually I make use of four paralell threads...", I should say
"Actually I make use of four timers... ", and I think the frameworks
implements them in different threats.

Finally, I still have no clue to know where the issue is.

I will preciate your concern. (Please help!!!)

Thanks in advance.
 
hmedinapy said:
Thank you very much for you reply Anaud.

I followed you steps, and I saw that my app uses about 26 threads,
eventually creates some new threats and then deletes them.

I want to make myself clear.

When I say "Actually I make use of four paralell threads...", I
should say "Actually I make use of four timers... ", and I think the
frameworks
implements them in different threats.

Finally, I still have no clue to know where the issue is.

I will preciate your concern. (Please help!!!)

Which thread consumes 100%CPU? Write down it's PID, then break into a
debugger and look the stack trace of this thread (identified by it's PID)

Arnaud
MVP - VC
 
Back
Top