Menu

high CPU usage after compile and debug

moonchild
2005-04-11
2012-09-26
1 2 > >> (Page 1 of 2)
  • moonchild

    moonchild - 2005-04-11
    • high CPU usage after compile and debug

    Hello
    i found this very nice Tool, dev cpp and ist great.
    but one thing is strage : after some steps such as compile , debug, execute is my PC very slow.
    task manager says DEV Cpp use 90-95 % of CPU.
    Question to developers :
    is there no sleep or sleep is too short in devcpp threads ?

     
    • Wayne Keen

      Wayne Keen - 2005-04-11

      Which version of Dev are you using?

      Wayne

       
      • Nobody/Anonymous

        today morning... not only that compiling&linking in debug mode took so long time. the creature even shot down my computer! no fun...the cpu simply overheated. had anyone ever got the same problem? LIX

         
    • moonchild

      moonchild - 2005-04-11

      Some more information to this :
      my operation systems are WINXP an WIN2K
      compile : simple win console app an win32 APP
      each 1 cpp - file, filesize 700-900 kb
      i use dev cpp 4.9.9.2, downloaded
      and installed full on 11.05.2005

       
      • Wayne Keen

        Wayne Keen - 2005-04-11

        11.05.2005?

        So you did not upgrade your gdb version?

        Wayne

         
    • moonchild

      moonchild - 2005-04-11

      aehm, downloaded and installed on 11.04.2005
      sorry, i had a heard monday :)

       
    • moonchild

      moonchild - 2005-04-11

      packages are:
      GNU Debugger 6.3-1
      gcc-objc 3.4.2-20040916-1
      binutils 2.15.94-20050118-1
      Insight_Bin 1.0

       
    • moonchild

      moonchild - 2005-04-11

      now i have istalled dev cpp full now up do date
      on 11.04.2005 21:20 GMT, - very latest version
      on another PC, with win2k too, have same problems with hight CPU usage..

       
      • Nobody/Anonymous

        I found the following code causes CPU usage to drop dramaticly both when the window is in focus and when it is out of focus.

            // Make sure the game engine isn't sleeping
            if (!GameEngine::GetEngine()->GetSleep())
            {
              // Check the tick count to see if a game cycle has elapsed
              iTickCount = GetTickCount();
              if (iTickCount > iTickTrigger)
              {
                iTickTrigger = iTickCount +
                  GameEngine::GetEngine()->GetFrameDelay();
                HandleKeys();
                GameEngine::GetEngine()->CheckJoystick();
                GameCycle();
              }
              // Lower CPU usage when window is in focus
              else {
               Sleep(iTickTrigger - iTickCount); 
              }
            }
            // Lower CPU usage when window is out of focus
            else {
              Sleep(iTickTrigger - iTickCount); 
            }
          }
        }
        return (int)msg.wParam;
        

        }

        // End the game
        GameEnd();

        return TRUE;
        }

         
      • Wayne Keen

        Wayne Keen - 2005-04-11

        You installed Insight. Is it configured as your default debugger? Or gdb?

        Sorry for the questions, I am slow.

        Wayne

         
    • moonchild

      moonchild - 2005-04-11

      i had these problems im my own application too,
      i had started a win-worker-thread within the app,
      and let him work permanently. this causes high cpu usage. i worked with MS dev stud 6.0, VC++
      after i build an "Sleep()" in that thread, things looks much better..sleep interval was ~ 100 ms only

      hope this helps you somehow,

      moonchild, germany

       
    • moonchild

      moonchild - 2005-04-11

      Where i can set default debugger ?

       
    • Wayne Keen

      Wayne Keen - 2005-04-11

      Tools:Compiler Options - down that path if memory serves. (Doubtful ;)

      Wayne

       
    • moonchild

      moonchild - 2005-04-11

      debugger is : gdb.exe

      other tools are
      gcc.exe,
      g++.exe
      make.exe
      windres.exe
      dllwrap.exe
      gprof.exe

       
    • Wayne Keen

      Wayne Keen - 2005-04-11

      Can you post a simple as possible example program and what you have been looking at so that your results can be duplicated by others?

      Wayne

       
    • moonchild

      moonchild - 2005-04-11

      my programm opens adobe reader , print some files with adobe reader and close adobe.
      the "high usage" is not always there, but after i compile, debug , run.. after some constellation of these steps. i dont'n know right , how i can reproduce it.. hm strage..
      if i should post my cpp, there are 386 lines..
      that is too big for a newsgroup thread ?

       
    • moonchild

      moonchild - 2005-04-11

      then.. its not easy to reproduce this

       
    • Nobody/Anonymous

      I had a similar prolem 2 or 3 years ago, when stepping though some code with the debugger, dev-cpp's CPU usage would soar to 100%.

      Sadly, it is not an easily reproducible problem. I suspect it has something to do with gdb. I had filed a bug report (I think the title was "to infinity and beyond", but it got closed without any resolution).

      Sorry, this does nothing to address your problem ....

      rr

       
    • Nobody/Anonymous

      Just to let you know this is not an isolated issue; I have the same problem, and also had it in 4.9.9.1 (and some earlier version as well).

      It is, perhaps, related to memory leakages? Often the 99% CPU usage appears when quiting a debugging session by clicking the tick-mark (debug) without letting the program run to its end. But then again, equally often the CPU usage soars during the debugging itself...

      I'm running Dev-Cpp against Cygwin, btw, but using the Mingw gdb (the one in dev-cpp/bin).

      A Blom

       
    • E.Naumovich

      E.Naumovich - 2005-04-12

      I got such problem, and I found that it occure when I `m trying to debug a code with memory allocation error (last time it was static non-initialized object). As I understood, problems rises in GDB-Dev-Cpp communications after attempts to watch "wrong" variable.

       
    • Nobody/Anonymous

      had the same problem once,related to hardware issues, if you are the type who likes to overclock your hardware, you know now why this is a bad idea.

       
    • Nobody/Anonymous

      Hi,

      My humble opinion....

      I observed the issue using different version of Devcpp, using different OS (win98,NT) and in several projects.

      I was able to reproduce the problem systematically. It happens using the debugging interface embedded in devcpp. This is the main reason that pushed me to switch (back:-) ) to an external debugger like console gdb, Gnu visual debugger, Insight (in order of preference).

      Now I am no longer observing the issue.

      Max

       
      • Robert Moynihan

        Robert Moynihan - 2005-11-21

        I agree with this assessment. I'm using Dev-C++ 4.9.9.2 on WinXP-SP2. I just downloaded this version last week, and I found that the embedded debugger gets into a problem when I a watching SOME variables -- I haven't narrowed it down further. I'm using all default settings (GCC compiler) to create a simple Win32 app. When debugging, processor usage for Dev-C++ goes flatlines near 100% and I have to kill Dev-C++ and restart the app to correct. If I just step through the code the problem doesn't seem to happen. Seems to be related ONLY to watching variables. Bob

         
    • Robert Moynihan

      Robert Moynihan - 2005-11-22

      Err... I should also say that the high resource usage doesn't happen right away, but only after a few minutes of debugging, while watching different variables. I don't want to give the impression that it happens quickly, if anyone is actually looking for a cause. Bob

       
    • Nobody/Anonymous

      Hi,

      I also agree with the above post... I am using Dev-C++ 4.9.9.2 on windows XP pro (SP2)... Whenever I try to debug my CPU usage shoots to 100%.

      Dennis

       
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.