Open Atemu opened 11 months ago
Thank you very much. I was able to reproduce this bug and fixed it -> https://github.com/arakiken/mlterm/commit/b77ab7365d9d28f4a2d69a8246a019a4db9fd964
Thank you so much!
What was the reproducer in the end? Because I'm not even sure how this bug was being triggered, so I couldn't produce a test scenario to ascertain whether this fixes the bug.
I reproduced this problem by following steps. Use testdata.txt file (from https://www.aljazeera.net) I attached to this message.
1) Start mlterm $ mlterm -sl unlimited -g 80x24 2) Execute a following command in mlterm $ cat testdata.txt 3) Use your mouse to resize the screen of mlterm to 79x24. 4) Scroll the screen of mlterm by pressing Shift+PageUp.
https://github.com/arakiken/mlterm/commit/b77ab7365d9d28f4a2d69a8246a019a4db9fd964#diff-6140e70a19a77257e685b8802dde5cc93900d20fb7834bb77f77a380e08f978bR35 fixed this problem. Before this fix, CHARSET macro in https://github.com/arakiken/mlterm/blob/master/vtemu/vt_char.c#L556 was expanded unexpectedly and vt_get_picture_char() returned a wrong value. As a result, vt_line_char_picture() in https://github.com/arakiken/mlterm/blob/master/uitoolkit/ui_screen.c#L5308C16-L5308C16 broke some backlog data and it caused segfault.
This has happened maybe twice or thrice this far but rarely, mlterm just hard-crashes when scrolling up from the bottom. It's been a longer session but I've had both longer sessions and sessions with much more verbose output and mlterm had no issue with those.
I was using adb a bunch and perhaps android prints some odd control chars? Really hard to say. Perhaps you have some insight here.