supercollider / scvim

Vim plugin for SuperCollider
GNU General Public License v3.0
121 stars 28 forks source link

scvim stopped working #49

Closed kflak closed 5 years ago

kflak commented 6 years ago

Getting strange behavior from scvim. It's been working well so far, but now it fails completely. I can run my patches from scide and sclang on the command line, but trying to run it from nvim (and vim) fails. Output from journalctl -xe (excerpt) is this:

Aug 29 20:47:07 arch systemd-coredump[10894]: Process 10841 (nvim) of user 1000 dumped core.

                                              Stack trace of thread 10846:
                                              #0  0x00007f3188ba6d7f raise (libc.so.6)
                                              #1  0x00007f3188b91672 abort (libc.so.6)
                                              #2  0x00007f3189e20075 n/a (libuv.so.1)
                                              #3  0x00007f3189e2df7c n/a (libuv.so.1)
                                              #4  0x00007f3189e2f0e6 uv_signal_stop (libuv.so.1)
                                              #5  0x0000555af00532c0 n/a (nvim)
                                              #6  0x00007f3189dfda9d start_thread (libpthread.so.0)
                                              #7  0x00007f3188c6aa43 __clone (libc.so.6)

                                              Stack trace of thread 10841:
                                              #0  0x00007f3188858e9b ~system_error_category (libstdc++.so.6)
                                              #1  0x00007f3188ba9997 __cxa_finalize (libc.so.6)
                                              #2  0x00007f3188829b38 __do_global_dtors_aux (libstdc++.so.6)
                                              #3  0x00007f3189e9c8de _dl_fini (ld-linux-x86-64.so.2)
                                              #4  0x00007f3188ba945c __run_exit_handlers (libc.so.6)
                                              #5  0x00007f3188ba958e exit (libc.so.6)
                                              #6  0x0000555aeff8b5e6 preserve_exit (nvim)
                                              #7  0x0000555aeffc58c2 n/a (nvim)
                                              #8  0x0000555aefefbfc9 multiqueue_process_events (nvim)
                                              #9  0x0000555aefefb699 loop_poll_events (nvim)
                                              #10 0x0000555af005780e n/a (nvim)
                                              #11 0x0000555af005484b ui_builtin_stop (nvim)
                                              #12 0x0000555aeffc61b3 mch_exit (nvim)
                                              #13 0x0000555aeff6bd1f getout (nvim)
                                              #14 0x0000555aeff8b679 preserve_exit (nvim)
                                              #15 0x0000555aeffc58c2 n/a (nvim)
                                              #16 0x0000555aefefbfc9 multiqueue_process_events (nvim)
                                              #17 0x0000555aefefb699 loop_poll_events (nvim)
                                              #18 0x0000555aefefcc3d process_wait (nvim)
                                              #19 0x0000555aeffc4b20 n/a (nvim)
                                              #20 0x0000555aeffc57e1 os_system (nvim)
                                              #21 0x0000555aefed5b9f n/a (nvim)
                                              #22 0x0000555aefedd7a3 call_func (nvim)
                                              #23 0x0000555aefee1dd2 n/a (nvim)
                                              #24 0x0000555aefee6862 ex_call (nvim)
                                              #25 0x0000555aeff1df9b do_cmdline (nvim)
                                              #26 0x0000555aefedcbfd call_user_func (nvim)
                                              #27 0x0000555aefedd590 call_func (nvim)
                                              #28 0x0000555aefee1dd2 n/a (nvim)
                                              #29 0x0000555aefee6862 ex_call (nvim)
                                              #30 0x0000555aeff1df9b do_cmdline (nvim)
                                              #31 0x0000555aefedcbfd call_user_func (nvim)
                                              #32 0x0000555aefedd590 call_func (nvim)
                                              #33 0x0000555aefee1dd2 n/a (nvim)
                                              #34 0x0000555aefee6862 ex_call (nvim)
                                              #35 0x0000555aeff1df9b do_cmdline (nvim)
                                              #36 0x0000555aeff3c3d8 n/a (nvim)
                                              #37 0x0000555aeff3d137 apply_autocmds (nvim)
                                              #38 0x0000555aeff6be03 getout (nvim)
                                              #39 0x0000555aeff0254e do_wqall (nvim)
                                              #40 0x0000555aeff1df9b do_cmdline (nvim)
                                              #41 0x0000555aeff9a208 n/a (nvim)
                                              #42 0x0000555aeffa3377 n/a (nvim)
                                              #43 0x0000555af0035c10 state_enter (nvim)
                                              #44 0x0000555aeff9a78a normal_enter (nvim)
                                              #45 0x0000555aefe795aa main (nvim)
                                              #46 0x00007f3188b93223 __libc_start_main (libc.so.6)
                                              #47 0x0000555aefe7a56a _start (nvim)
-- Subject: Process 10841 (nvim) dumped core
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: man:core(5)
-- 
-- Process 10841 (nvim) crashed and dumped core.
-- 
-- This usually indicates a programming error in the crashing program and
-- should be reported to its vendor as a bug.

Running this on Arch linux 4.14.59-rt37-1-rt-lts

Any thoughts are much appreciated! Reboot usually solves it for a little while.

kflak commented 6 years ago

Additional info: seems the issue may be related to MIDI in some weird way. Before this I have been having a hard time connecting external MIDI devices using MIDIIn.connectAll. I've had to make several attempts at connecting before succeeding, which is not the case when connecting via scide or sclang directly.

dvzrv commented 6 years ago

yeah, MIDI can be flaky sadly. Maybe run something like patchage meanwhile to see what's happening to the JACK graph.

Also: Can you reproduce the crash using vim? -- https://sleepmap.de

kflak commented 6 years ago

Of course, after the latest reboot I can't manage to crash the thing even if I try hard ;-) Previously, though, vimi has also been affected. Once the crash has happened I haven't been able to launch sc through vim either. More details: :SClangStart causes a terminal window to pop up and immediately disappear, much in the same way as if I am already running an instance of sclang. After this I can't quit vim in the usual way (:qwa in this case), and I need to reboot to be able to do anything scvim-related. Is some environment variable or lockfile or something like that being set that I could clean out manually after a crash?

dvzrv commented 6 years ago

There will be a pid and pipe created in your /tmp (or $XDG_RUNTIME_DIR):

-rw-r--r--  1 dave dave    6 Sep 29 12:04 sclangpipe_app-pid
prw-r--r--  1 dave dave    0 Sep 29 12:04 sclang-pipe

Have you tried using :SClangstart in vim when inside screen/tmux?

kflak commented 6 years ago

Hi,

Still haven't experienced this problem since I filed the issue, except for yesterday when I accidentally deleted ruby from my system. Reinstalling it fixed the issue... Other than that I have no idea what can cause this. I will let you know if it happens again!