neovim segfaults after dismissing and reopening onscreen keyboard
If I open a particular file in neovim, scroll to the very last line, minimize termux and then open it, neovim segfaults. Consistently. I eliminated my configs as a reason.
What about dismissing and reopening the virtual keyboard that could cause a segfault? Is it possible to recreate those conditions on a PC? This is my main ask. I want to figure out if this is problem belongs to neovim, termux, or both.
Steps to reproduce:
Use the virtual keyboard for this.
1. Paste into termux:
curl -s https://termbin.com/2q2fq | nvim -u NONE -c "set linebreak"
(You can copy the command from the 1st comment for convenience)
2. Type G$
(move the cursor to the end of the last line in the file)
3. Dismiss the virtual keyboard (open the side menu and hit "keyboard")
4. Bring the virtual keyboard back up (repeat prior step).
It looks like the bug is caused by the last line being wrapped and partially offscreen. So your terminal dimensions have to allow that.
Environment information:
Neovim version: 0.8.3
Termux version: 0.118.0
Android Version: 10
Terminal dimensions: 35 cols × 14 lines. (This has to do with line wrapping, if the line doesn't wrap, it won't work.)
Edit 1: Simplified reproduction steps. You don't have to paste commands into neovim anymore.
Edit 2: Added environment information section.
Edit 3: Changed mentions of suspending termux to dismissing the keyboard.23 Replies
curl -s https://termbin.com/2q2fq | nvim -u NONE -c "set linebreak"
^ The command to paste, for convenience
are you sure its a segfault adn not android killing the process?
it can be phantom process killing
you should share a screenshot
?tag A12
Phantom Process Killing 📱 🔫 👻
Termux being randomly killed is a known problem because of Android 12 CPU optimisation mechanism, displayed as
[Process completed (signal 9) - press Enter]
error
- More information about the issue:
https://github.com/termux/termux-app/issues/2366
- Potential solutions to fix that
https://github.com/agnostic-apollo/Android-Docs/blob/master/en/docs/apps/processes/phantom-cached-and-empty-processes.md#commands-to-disable-phantom-process-killing-and-tldr (link above takes you to end chapter, the whole thing has in-depth description of what's happening)It says Segmentation Fault in the terminal. I don't have Android 12. It's a consistent segfault with this file, and it doesn't happen with files in general. So I doubt this is the culprit.
cant reproduce this in v0.9.0-dev or v0.8.3
Interesting. Is the line wrapping?
And did you make sure to hit $? It doesn't happen unless you're near the end of the last line.
yea i did G$
v0.8.3
Ah. Ok. This makes some sense. Blow up the font size more. Try to get it close to 35 columns.
34 columns
Interesting. Ok, try to make sure the bottom line cannot fit fully on the screen. So either use your virtual keyboard or blow up the font some more. Or use a font with larger letters.
Using a split prevents this error from happening for me, so that's not an option to shrink the height of the window.
More information: Dismissing the virtual keyboard and then bringing it back up again causes the segfault, too. The suspension may not be the problem.
Hypothesis: Maybe screen resizes cause it.
Test: Blow up the font and then reduce it. This resizes the screen. See if a segfault happens.
Result: No segfault.
The segfaults happen at dimensions of 13 lines × 33 columns and 14 lines × 35 columns. The start of the line being offscreen seems necessary for a segfault, but doesn't guarantee it.
did get a segfault but it exited with an error
it happens when you zoom in enough to hide the eob (end of buffer)
errors dont happen on first one
What error code did you get?
oh, it is segfault
Does anyone know what more investigation I can do to figure out the cause(s)?
raise an issue on github, theyll be able to explain it better
Termux's github?
no neovim
https://github.com/neovim/neovim
GitHub
GitHub - neovim/neovim: Vim-fork focused on extensibility and usabi...
Vim-fork focused on extensibility and usability. Contribute to neovim/neovim development by creating an account on GitHub.
Thank you Fisher for helping me reproduce!
For anyone curious: https://github.com/neovim/neovim/issues/22278
GitHub
Neovim segfaults on termux when dismissing and raising onscreen key...
Describe the bug If I open a particular file in neovim, scroll to the very last line, dismiss the onscreen keyboard, and then pull the keyboard back up again, neovim segfaults. Consistently. I elim...
I'm marking this as complete because it looks like they managed to reproduce this without termux.