Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187712 - xfce-extra/xfce4-cpugraph-0.3.0 - curve fills only half of graph area
Summary: xfce-extra/xfce4-cpugraph-0.3.0 - curve fills only half of graph area
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: XFCE Team
URL: http://bugzilla.xfce.org/show_bug.cgi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-04 11:47 UTC by Ondřej Barda
Modified: 2007-08-04 13:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondřej Barda 2007-08-04 11:47:58 UTC
Cpu usage curve disappear in the midle of graph area, never reach left edge of it.

Reproducible: Always

Steps to Reproduce:
1.Add cpugraph to the panel
2.change to normal mode
3.watch cpu usage graph
Actual Results:  
Curve fills only right half of graph area

Expected Results:  
Curve fills full graph area

Portage 2.1.2.9 (default-linux/amd64/2006.1/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.22.1 x86_64)
=================================================================
System uname: 2.6.22.1 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 04 Aug 2007 01:47:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -msse3 -pipe "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -msse3 -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LINGUAS="en cs"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/layman/x4x-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa amd64 bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr emboss encode fam firefox flac gdbm gif gstreamer gtk gtk2 hal iconv isdnlog jpeg ldap libg++ libnotify mad midi mikmod mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre png ppds pppd python quicktime readline reflection sdl session spell spl ssl startup-notification tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xcomposite xml xorg xv zlib" ALSA_CARDS="emu10k1 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Here is the patch solving this problem:

--- xfce4-cpugraph-plugin-0.3.0.orig/panel-plugin/cpu.c
2005-10-09 11:06:46.000000000 +0200 +++
xfce4-cpugraph-plugin-0.3.0/panel-plugin/cpu.c	2007-03-18
00:29:40.000000000 +0100 @@ -626,7 +626,7 @@ base->m_CPUUsage =
GetCPUUsage (&base->m_OldUsage, &base->m_OldTotal); 
     memmove (base->m_History + 1, base->m_History,
-             (base->m_Values - 1) * sizeof (int));
+             (base->m_Values - 1) * sizeof (long));
     base->m_History[0] = base->m_CPUUsage;
 
     /* Tooltip */
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2007-08-04 13:45:50 UTC
Committed as -r1 and reported it to upstream, see URL.

It seems to be an 64bit issue? I couldn't reproduce it with 32bit, but it doesn't break it either..