bubblemon-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bubblemon-list] Re: Another stack trace


From: Johan Walles
Subject: [Bubblemon-list] Re: Another stack trace
Date: Tue, 22 Oct 2002 13:19:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607

Thanks a bunch. As you can see, loadPercentage is 103, so just rounding anything > 100 to exactly 100 seems like a good enough solution. If you wish to patch your sources so that you can have a working version directly instead of waiting for me to release a new one, change the following if clause just above line 145 of gnome1-meter.c:

"
if (loadPercentage == 101)
{
  loadPercentage = 100;
}
"

into

"
if (loadPercentage > 100)
{
  loadPercentage = 100;
}
"

I'll put that change in the next release.

  Cheers //Johan

Peter R. Thorsen Jr. wrote:
Johan,

Here is the latest info from the stack trace that you asked for:

GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run
Starting program: /usr/local/src/bubblemon-1.2.8/src/bubblemon-gnome1

** ERROR **: file gnome1-meter.c: line 145 (getCpuLoad): assertion failed: ((loadPercentage 
>= 0) && (loadPercentage <= 100))
aborting...

Program received signal SIGABRT, Aborted.
0x42029331 in kill () from /lib/i686/libc.so.6
(gdb) frame 5
#5  0x0804b71e in getCpuLoad (currentCpu=0, nCpus=1) at gnome1-meter.c:145
145       g_assert((loadPercentage >= 0) && (loadPercentage <= 100));
(gdb) info locals
nCpus = 103
cpu = {flags = 2047, total = 8015376, user = 1441246, nice = 2174,
  sys = 36229, idle = 6535727, frequency = 100, xcpu_total = {0, 0, 0, 0},
  xcpu_user = {0, 0, 0, 0}, xcpu_nice = {0, 0, 0, 0}, xcpu_sys = {0, 0, 0, 0},
    xcpu_idle = {0, 0, 0, 0}}
loadPercentage = 103
my_user = 1441246
my_system = 4761152581135237126
my_total = 65
load = 1477475
oLoad = 1477408
oTotal = 8015311
i = 6
(gdb)

Pete







reply via email to

[Prev in Thread] Current Thread [Next in Thread]