Closed ralight closed 2 years ago
I was unaware of signal-unsafe functions when I added sigwinch support. I think we'll need to defer most of the sigwinch handler until we can redraw outside of the handler. We may also need to sigprocmask sigwinch so that the handler is deferred as well.
It looks like we can, and should probably, just have NCURSES handle this for us and emit a KEY_RESIZE instead. Could you give the linked commit a try?
I've not managed to make it crash with that commit, and valgrind doesn't report any errors either when I use it.
@rsaxvc, could you send a PR to pixe/hexedit? This is important to fix the next release in Debian.
Sent. I also retested it on Debian10, but it never failed there before or after for me.
Sent. I also retested it on Debian10, but it never failed there before or after for me.
Thanks. Maybe it fails in Debian 11 and above.
Hi there,
I've just run across a reproducible crash when running hexedit 1.5-2 on kubuntu 21.04. I ran
hexedit <file>
in konsole, where the terminal was around 232x61 characters in size. I then resized the window to be smaller using the bottom right hand corner handle (i.e. in both x and y) and hexedit crashed. It doesn't crash consistently when doing this, my impression is that if I resize slowly at the beginning then I can later resize the window as much and as quickly as I want, but I could be mistaken. If I resize quickly it is more likely to crash. I typically find it easier to reproduce using a circular resizing motion.I've reproduced with two files, one around 9000 bytes and the other >600,000 bytes.
I've attached a video showing me doing this: https://user-images.githubusercontent.com/79578/121201333-5ac7d180-c86c-11eb-8220-3f294569e7f3.mp4
And this is the valgrind log from a different run: