-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] application freezed, does not respond to keyboard/mouse input. #41
Comments
@zhanglei002 With scrolling do you mean with the up/down keys or with mouse scroll? Also would mind downloading the precompiled static binary from the release and see if it causes the same issue on your system? It looks to be happening when trying to clear any reamaining input in stdin after reading a key, on line 98: Lines 97 to 98 in 5ae05f0
SSmax is: Line 132 in 5ae05f0
The while loop should be guarded from infinity by only reading max 100 characters but not sure why the ignore function gets stuck. And thanks for the great backtrace :) |
Not immediately. Not sure, sometimes.
it seems it can be easily reproduced with mouse scroll(touchpad in my case).
can also be reproduced with precompiled static binary. |
@zhanglei002 if (cin.rdbuf()->in_avail() > 0) cin.ignore(cin.rdbuf()->in_avail()); I think the issue might be that line would have always gotten stuck, but in 99% of cases it never gets reached because it's hard to create more than 100 characters in less time than the program can read them. Your thouchpad might be doing something weird like instead of actually emulating a mouse scroll, generating a bunch keyboard commands? Try with latest commit. |
Thanks for the quick fix! |
No problem :) Thanks for the great debugging, would have been a very hard solve without it. |
Describe the bug
[A clear and concise description of what the bug is.]
To Reproduce
randomly scroll process list.
Expected behavior
[A clear and concise description of what you expected to happen.]
Screenshots
[If applicable, add screenshots to help explain your problem.]
Info (please complete the following information):
Additional context
contents of
~/.config/btop/btop.log
(try running btop with
--debug
flag if error.log is empty)GDB Backtrace
Thread 2 (LWP 2749 "btop"):
#0 0x00007f2bc7bd0a9d in syscall () from /usr/lib/libc.so.6
#1 0x0000563a794fda5e in void std::__detail::__platform_wait(int const*, int) ()
#2 0x0000563a795516c7 in Runner::_runner(void*) ()
#3 0x00007f2bc7cad299 in start_thread () from /usr/lib/libpthread.so.0
#4 0x00007f2bc7bd6053 in clone () from /usr/lib/libc.so.6
Thread 1 (LWP 2748 "btop"):
#0 0x00007f2bc7cb687c in read () from /usr/lib/libpthread.so.0
#1 0x00007f2bc7eed662 in std::__basic_file::xsgetn (this=this@entry=0x7f2bc8037b08 <__gnu_internal::buf_cin+104>, __s=0x563a7996ddd0 "\033[A0;122;33m\033[<0;114;34m\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M\033[<65;97;45M", __n=__n@entry=8191) at basic_file.cc:331
#2 0x00007f2bc7f2eb61 in std::basic_filebuf<char, std::char_traits >::underflow (this=0x7f2bc8037aa0 <__gnu_internal::buf_cin>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/streambuf:487
#3 0x00007f2bc7ec7ee1 in std::basic_streambuf<char, std::char_traits >::sgetc (this=0x7f2bc8037aa0 <__gnu_internal::buf_cin>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/streambuf:343
#4 std::basic_streambuf<char, std::char_traits >::sgetc (this=) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/streambuf:343
#5 std::basic_streambuf<char, std::char_traits >::snextc (this=) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/streambuf:308
#6 std::istream::ignoreXX (this=0x7f2bc80385a0 std::cin, __n=9223372036854775807) at /build/gcc/src/gcc/libstdc++-v3/src/c++98/compatibility.cc:96
#7 0x0000563a7951fa67 in Input::getabi:cxx11 ()
#8 0x0000563a794e2abd in main ()
The text was updated successfully, but these errors were encountered: