Closed ghost closed 4 years ago
Adding hook to pause scrolling during font change reduces probability of crash. I guess if we will be able to completely freeze TerminalView rendering during font change, the issue will be solved.
It would be nice to reproduce the issue in a minimal test case, started https://github.com/fornwall/fontchanger for that.
Fixed in Termux:Styling app, https://github.com/termux/termux-styling/pull/66.
Problem description
Changing console font with Termux:Styling may cause application to be force-stopped due to SIGBUS sent to Android runtime.
Issue happens only when screen content is actively updated during font change and is independent of Android OS version used (tried Android 7 - 10).
Steps to reproduce
Execute some command which will continuously output characters to stdout. For example:
If context menu cannot be opened, try to
cat
some file in cycle:or
Open styling menu and continuously switch between
Default
and some other font (I pickedAnonymous Pro
). Crash usually observed when switching back toDefault
font.Expected behavior
Font switching should be possible without crash in all cases of terminal state.
Even if this is Android bug, a workaround should be done because it happens on most devices if not all.
Additional information
Logcat (Android 8, Samsung Galaxy S7):
Logcat (Android 10 AVD):
Click to expand log