You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qterminal segfaults(in libqtermwidget5.so.1.1.0) when scrolling up to the beginning, if too many lines are present in history!
Sometimes (but don't know how to reproduce this variant), just one Shift+PageUp from where I am is enough to show empty(black or zeroed) previous scrollback pages!
Possible Solution
Maybe limit the maximum number of lines ? or use a bigger type than 'int' when computing things like lines*columns otherwise the result will wrap around?
Steps to Reproduce (for bugs)
start qterminal and resize to 162x52 (columns x rows) and make sure Preferences->Behavior->Unlimited history is selected.
run this inside it, in bash: printf '%s\n' {1..15000000}
this will print a number for each line up until 15 million. (will take 1 minute to run)
hold left mouse button on the scrollbar and scroll back up, not too fast, until the beginning.
qterminal should crash when you're at under 2milion lines while still scrolling up.
Context
Sometimes the history (scrollback buffer) is empty when I do a shift+PageUp, sometimes like here it crashes the window and thus looses my shell.
In the real world I encounter this when compiling things... but the shift+PageUp showing empty previous screens is what I encounter most!
System Information
Distribution & Version: Gentoo ~amd64
Kernel: 5.18.19-gentoo-r1-x86_64
Qt Version: Qt version 5.15.5.
lxqt-build-tools Version: I don't know how to get this?
Expected Behavior
no segfault
Current Behavior
qterminal segfaults(in libqtermwidget5.so.1.1.0) when scrolling up to the beginning, if too many lines are present in history!
Sometimes (but don't know how to reproduce this variant), just one Shift+PageUp from where I am is enough to show empty(black or zeroed) previous scrollback pages!
Possible Solution
Maybe limit the maximum number of lines ? or use a bigger type than 'int' when computing things like lines*columns otherwise the result will wrap around?
Steps to Reproduce (for bugs)
qterminal
and resize to 162x52 (columns x rows) and make sure Preferences->Behavior->Unlimited history is selected.printf '%s\n' {1..15000000}
this will print a number for each line up until 15 million. (will take 1 minute to run)
qterminal should crash when you're at under 2milion lines while still scrolling up.
Context
Sometimes the history (scrollback buffer) is empty when I do a shift+PageUp, sometimes like here it crashes the window and thus looses my shell.
In the real world I encounter this when compiling things... but the shift+PageUp showing empty previous screens is what I encounter most!
System Information
qtermwidget/lib/ScreenWindow.cpp
Lines 59 to 63 in 41bd8de
At first glance, 15 million lines of 163 rows seems to overflow
int size
there.15000000*163 = 2_445_000_000
>2^31 = 2_147_483_648
But there are other
int
places:qtermwidget/lib/ScreenWindow.cpp
Lines 91 to 94 in 41bd8de
gdb backtrace? (click me to expand)
The text was updated successfully, but these errors were encountered: