kassio/neoterm

Can't run IEX or mix in terminal.

netikular opened this issue · 5 comments

Describe the bug
Launch the terminal and try to launch iex and you get

fish: 'mix' terminated by signal SIGBUS (Misaligned address error)

To Reproduce
Steps to reproduce the behavior:

  1. Opened a neoterm with :T mix test
  2. see error

Expected behavior
I expect iex or mix to run

Screenshots/gifs
image

Versions (Issues without this information will take longer to be answered/solved):

  • OS: [e.g. macOS
  • neoterm commit master/78461935fcd6888c02e4368126a2cb645b80816e
  • Add all the configuration you have for neoterm

let g:neoterm_autoinsert=1
let g:neoterm_default_mod="botright"

- Vim or Neovim
- [ ] vim
- [X] neovim
- Version [vim --version]
pablo (order_create_actually_using_shipstation *$) > vim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20201103-57912-svovf1/neovim-0.4.4/build/config -I/tmp/neovim-20201103-57912-svovf1/neovim-0.4.4/src -I/usr/local/include -I/tmp/neovim-20201103-57912-svovf1/neovim-0.4.4/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20201103-57912-svovf1/neovim-0.4.4/build/src/nvim/auto -I/tmp/neovim-20201103-57912-svovf1/neovim-0.4.4/build/include
Compiled by brew@Catalina

Features: +acl +iconv +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.4/share/nvim"

Run :checkhealth for more info
**Additional context**
I wish I had more, I really have no idea what is happening.  I was using it just fine and then restarted vim and it stopped working.  I don't know if I installed anything, I can run the command in just the :terminal command.

I wasn't able to replicate. It might be something with fish+elixir/erlang. On zsh it worked propoerly.

term______58387__usr_local_bin_zsh__neoterm-1

Huh, I'll try and see if it starts to work on my machine if I change shells.

Confirmed, it does seem to be a combination of nvim neoterm, and fish.

I changed my base shell to zsh and restarted everything and all is good now. So strange. I had tested this by just running bash in the terminal, but that still failed so I thought that would be an issue, but it must be related to it being a sub-process of fish.

Ok, I'll continue investigating. Thanks for furthering my investigation.

Ok, incase anyone finds this on google:

The problem in my config was that I had a syntax error that caused the $PATH variable to be populated with 111 paths. There must be a bug in the mix or iex scripts that causes the memory fault with a $PATH variable that is too huge.

Thanks again to @kassio for investigating - it helped me diagnose where the issue was.

Edited:

I tried to reproduce the error, but I must have missed something that I did when "fixing" the problem. I can't seem to get the error to happen again. I know for sure that it was "fixed" when I corrected my fish config and got rid of those extra paths, but now putting the configuration back it is not causing the error 🤦‍♂️ . So that means that I fixed it with something else 😭.

In any case I hope that this note finds someone in the future and they are able to solve the problem. For now I can't work up anything that would let me post an issue to the iex or the mix teams. So this is going to be one of those unsolved mysteries.

@netikular thanks for opening the issue an posting your solution! I really appreciate that. ❤️