pybootchartgui crashed with TypeError in render()

Bug #552794 reported by Dana Goyette
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pybootchartgui (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: pybootchartgui

After applying the fix in the bug report here ( https://bugs.launchpad.net/ubuntu/+source/pybootchartgui/+bug/512172 -- title: "pybootchartgui crashed with ValueError in get_proc_state()" ) -- I now get a different crash, as the bug title reports.

Note that the kernel I am booted is the March 23rd kernel from here ( http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-next/ ) -- unfortunately, it seems like these kernels have stopped being updated.

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: pybootchartgui 0+r139-2 [modified: usr/share/pyshared/pybootchartgui/draw.py]
Uname: Linux 2.6.34-996-generic x86_64
Architecture: amd64
Date: Wed Mar 31 12:53:48 2010
ExecutablePath: /usr/bin/pybootchartgui
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/bootchart --format=png --crop-after=compiz,metacity,mutter,kwin,xfwm4 --annotate=ureadahead,mountall,hostname,hwclock --annotate=Xorg --annotate=gdm-session-worker --output=/var/log/bootchart /var/log/bootchart/hostname-lucid-20100331-4.tgz
ProcEnviron:

PythonArgs: ['/usr/bin/bootchart', '--format=png', '--crop-after=compiz,metacity,mutter,kwin,xfwm4', '--annotate=ureadahead,mountall,hostname,hwclock', '--annotate=Xorg', '--annotate=gdm-session-worker', '--output=/var/log/bootchart', '/var/log/bootchart/hostname-lucid-20100331-4.tgz']
SourcePackage: pybootchartgui
Title: pybootchartgui crashed with TypeError in render()
UserGroups: pulse-access

Revision history for this message
Dana Goyette (danagoyette) wrote :
visibility: private → public
Revision history for this message
Anders Norgaard (anders-norgaard) wrote :

Hi,

If you upload your

/var/log/bootchart/hostname-lucid-20100331-4.tgz

then I'll have a look.

Best
Anders

Changed in pybootchartgui (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Incomplete
tags: removed: need-duplicate-check
Revision history for this message
Dana Goyette (danagoyette) wrote :
Revision history for this message
Anders Norgaard (anders-norgaard) wrote :

Hi,

When I apply the fix manually (by editing the file in nano). It works for me. How did you apply the fix?

Best
Anders

anders@salt2:~/devel/pybootchartgui$ /usr/bin/bootchart --format=png --crop-after=compiz,metacity,mutter,kwin,xfwm4 --annotate=ureadahead,mountall,hostname,hwclock --annotate=Xorg --annotate=gdm-session-worker --output=elitebook.png examples/EliteBook-lucid-20100331-4.tgz
parsing 'examples/EliteBook-lucid-20100331-4.tgz'
parsing 'header'
parsing 'proc_stat.log'
parsing 'proc_diskstats.log'
parsing 'proc_ps.log'
warning: no parent for pid '2' with ppid '0'
merged 0 logger processes
pruned 429 process, 0 exploders, 370 threads, and 46 runs
False
Traceback (most recent call last):
  File "/usr/bin/bootchart", line 23, in <module>
    sys.exit(main())
  File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 137, in main
    render()
  File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 128, in render
    batch.render(writer, res, options, filename)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/batch.py", line 41, in render
    draw.render(ctx, options, *res)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 299, in render
    draw_process_bar_chart(ctx, proc_tree, times, curr_y + bar_h, w, h)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 319, in draw_process_bar_chart
    draw_processes_recursively(ctx, root, proc_tree, y, proc_h, chart_rect)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 357, in draw_processes_recursively
    child_x, child_y = draw_processes_recursively(ctx, child, proc_tree, next_y, proc_h, rect)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 349, in draw_processes_recursively
    draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 376, in draw_process_activity_colors
    state = get_proc_state( sample.state )
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 105, in get_proc_state
    return "RSDTZXW".index(flag) + 1
ValueError: substring not found
anders@salt2:~/devel/pybootchartgui$ sudo nano -w /usr/lib/pymodules/python2.6/pybootchartgui/draw.py
[sudo] password for anders:

Sorry, try again.
[sudo] password for anders:
anders@salt2:~/devel/pybootchartgui$ /usr/bin/bootchart --format=png --crop-after=compiz,metacity,mutter,kwin,xfwm4 --annotate=ureadahead,mountall,hostname,hwclock --annotate=Xorg --annotate=gdm-session-worker --output=elitebook.png examples/EliteBook-lucid-20100331-4.tgz
parsing 'examples/EliteBook-lucid-20100331-4.tgz'
parsing 'header'
parsing 'proc_stat.log'
parsing 'proc_diskstats.log'
parsing 'proc_ps.log'
warning: no parent for pid '2' with ppid '0'
merged 0 logger processes
pruned 429 process, 0 exploders, 370 threads, and 46 runs
False
bootchart written to 'elitebook.png'
anders@salt2:~/devel/pybootchartgui$ eog elitebook.png
anders@salt2:~/devel/pybootchartgui$

Revision history for this message
Dana Goyette (danagoyette) wrote :

I downloaded the raw gui.py file from the googlecode link and replaced my gui.py file.

Revision history for this message
Dana Goyette (danagoyette) wrote :

... Ah, I see now... I replaced the wrong file. I've reinstalled pybootchartgui and manually edited draw.py -- and now I'll try rebooting to see if that fixes it. If it does, then that makes this bug "invalid" due to incorrect modification of files.

Revision history for this message
Dana Goyette (danagoyette) wrote :

Okay, now I can confirm: this was my mistake -- now pybootchartgui works correctly for me.

Changed in pybootchartgui (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.