New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGFPE in update_popups #4615
Comments
|
**Describe the bug**
In certain cases when a script is updating the popup window, vim crashes with a floating point exception. I'm not sure what specifically in the script causes the crash, but a backtrace and steps to reproduce it is provided below.
**To Reproduce**
1. Install [coc.nvim](https://github.com/neoclide/coc.nvim)
E.g. with `vim-plug` run `curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim`, place the below in `.vimrc` and run `:PlugInstall`:
```
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
```
2. Install `coc-tsserver` by running `:CocInstall coc-tsserver`.
3. Edit a javascript file, `:e test.js`.
4. Type `document.querySelector()` in insert mode.
**Backtrace**
```
#0 0x00005555556dcba1 in update_popups (win_update=0x555555711e64 <win_update>) at popupwin.c:2468
#1 0x00005555557119f5 in update_screen (type_arg=0) at screen.c:825
#2 0x00005555555b2405 in ins_redraw (ready=1) at edit.c:1574
#3 0x00005555555b0676 in edit (cmdchar=97, startln=0, count=1) at edit.c:581
#4 0x00005555556a5715 in invoke_edit (cap=0x7fffffffdef0, repl=0, cmd=97, startln=0) at normal.c:9058
#5 0x00005555556a5691 in nv_edit (cap=0x7fffffffdef0) at normal.c:9028
#6 0x0000555555696ae7 in normal_cmd (oap=0x7fffffffdf80, toplevel=1) at normal.c:1100
#7 0x0000555555804cc1 in main_loop (cmdwin=0, noexmode=0) at main.c:1370
#8 0x00005555558042eb in vim_main2 () at main.c:903
#9 0x00005555558039de in main (argc=3, argv=0x7fffffffe188) at main.c:444
```
**Environment (please complete the following information):**
- Vim version: Tested both with release 8.1.1616 from my distro, and a build of master (v8.1.1633)
- OS: Arch Linux
- Terminal: kitty
Thanks for the report. The repro is too complicated, but fortunately
the line number in popupwin.c points to the crash line. I managed to
reproduce it with:
let winid = popup_create([
\ 'one', 'two', 'longer line that wraps', 'four', 'five'], {
\ 'scrollbar': 1, 'maxwidth': 10, 'maxheight': 5,
\ 'firstline': 2})
…--
A real patriot is the fellow who gets a parking ticket and rejoices
that the system works.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
Thanks! |
manuelschiller
pushed a commit
to manuelschiller/vim
that referenced
this issue
Nov 10, 2019
Problem: Crash when popup has fitting scrollbar. (Trygve Aaberge) Solution: Don't divide by zero if the scrollbar just fits. (closes vim#4615)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In certain cases when a script is updating the popup window, vim crashes with a floating point exception. I'm not sure what specifically in the script causes the crash, but a backtrace and steps to reproduce it is provided below.
To Reproduce
E.g. with
vim-plugruncurl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim, place the below in.vimrcand run:PlugInstall:coc-tsserverby running:CocInstall coc-tsserver.:e test.js.document.querySelector()in insert mode.Backtrace
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: