Open lbhm opened 3 years ago
@lbhm I can't reproduce this and are not really sure how it would crash with this particular error, since the line causing a error is not related to CPU temperature.
Can you run python3 -c 'import pprint, psutil; pp = pprint.PrettyPrinter(); pp.pprint(psutil.sensors_temperatures())'
and post the output?
Sure:
[lbhm@manjaro ~]$ python3 -c 'import pprint, psutil; pp = pprint.PrettyPrinter(); pp.pprint(psutil.sensors_temperatures())'
{'k10temp': [shwtemp(label='Tctl', current=56.25, high=None, critical=None),
shwtemp(label='Tdie', current=56.25, high=None, critical=None),
shwtemp(label='Tccd1', current=38.5, high=None, critical=None)],
'nvme': [shwtemp(label='Composite', current=26.85, high=84.85, critical=84.85),
shwtemp(label='Sensor 1', current=26.85, high=65261.85, critical=65261.85),
shwtemp(label='Sensor 2', current=41.85, high=65261.85, critical=65261.85)]}
These are also the options that I am seeing in the CPU sensor selection.
I am also not able to reproduce this crash every time I try it. But starting bpytop a couple of times and switching through the sensor options, I was able to reproduce the crash six times by now.
Maybe this is completely unrelated by I think that the crash is more likely to happen with my default terminal size (104x28) than if I put the terminal into full-screen mode. Is this maybe something rendering related that only happens with the CPU sensor selection by chance?
Edit: I tried out a few more terminal sizes and was able to reproduce the crash on small terminal sizes like 104x28 or 80x24 by just switching through the selection for long enough but couldn't reproduce it with a full-screen terminal so far.
@lbhm This may be caused by my implementation of multithreading in bpytop. When you switch through the different sensor options the CPU box is triggered to be redrawn, you might be able to get the CPU box to redraw before the CPU core graphs have been recreated (if you trigger this fast enough or have a slow cpu) which would cause this error.
Will take a look at preventing this from being able to happen when I've got some time.
Describe the bug After reading #256, I got curious to see what CPU sensor options are available on my Ryzen 3600. So I went to the options menu and switched through the CPU sensor options. However, when I am switching from the last option to the first, bpytop crashes with exit code 1:
The error log shows:
To Reproduce
bpytop
Expected behavior
The CPU sensor selection should switch back to the first option instead of crashing.
Screenshots
[If applicable, add screenshots to help explain your problem.]
Info (please complete the following information):