[BUG] GPU mode, resizing the terminal will cause a crash.
Describe the bug
ERROR: Exception in runner thread -> Cpu:: -> deque::_M_range_check: __n (which is 5)>= this->size() (which is 4)
When the terminal's window becomes smaller than a certain size, it will crash. It is caused by the GPU reality; if the GPU is turned off, it won't crash.
To Reproduce
[Steps to reproduce the behavior:]
Expected behavior
[A clear and concise description of what you expected to happen.]
Screenshots
[If applicable, add screenshots to help explain your problem.]
Additional context
2024/01/29 (19:37:45) | ===> btop++ v.1.3.0 2024/01/29 (19:37:45) | ERROR: Exception in runner thread -> Cpu:: -> deque::_M_range_check: __n (which is 3)>= this->size() (which is 2)
2024/01/29 (19:37:56) | ===> btop++ v.1.3.0 2024/01/29 (19:37:56) | ERROR: Exception in runner thread -> Cpu:: -> deque::_M_range_check: __n (which is 5)>= this->size() (which is 4)
GDB Backtrace
It seems like only a maximum of 6 GPU is supported by btop. There's a preset pre-validate code in btop_config.cpp:L402-434, once the resize func is used, the config preset is validated through the code, causing the problem.