-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
NullPointerException occurs after another plugin fails #50
Comments
Ah damn, I'm sorry, that's really annoying! I'll have a dig asap. I see
some errors around not being able to read a file in tmp which looks fishy
to me. I didn't think conjure read files like that 🤔 I'll solve it!
…On Wed, 17 Jul 2019, 17:40 Dave Yarwood, ***@***.***> wrote:
Error
I ran into what looks like an edge case related to a different plugin (
vista.vim <https://github.com/liuchengxu/vista.vim>) failing. Here's the
:messages output:
[image: 2019-07-17-123252_1719x292_scrot]
<https://user-images.githubusercontent.com/4909079/61393487-0ccc0e00-a88f-11e9-8be1-cc441071cdb4.png>
Conjure is working fine in general, I just run into this problem when
vista fails. Here's the timeline that reliably produces the error condition:
1. I have a prepl already started for my project. (Conjure will
connect to it successfully if I *don't* attempt to open the vista.vim
sidebar like I do below.)
2. I start a Vim session, editing a .clj file in my project.
3. I run :Vista!! to open the vista.vim sidebar.
4. Vista throws an error. (the first error in the screenshot above)
5. Conjure then does its usual startup routine where it tries to
connect to prepls according to my conjure.edn settings.
6. Conjure throws an error. (the second error in the screenshot above,
starting with Error from thread 'RPC message handler')
Logs
19-07-17 16:29:59 moondog INFO [conjure.main:40] - Logging initialised
19-07-17 16:29:59 moondog INFO [conjure.main:42] - System versions
=== Conjure ===
v0.22.0-0-g0cbb94a56f
=== OS ===
Linux moondog 4.15.0-54-generic #58~16.04.1-Ubuntu SMP Mon Jun 24 13:21:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
=== Neovim ===
NVIM v0.4.0-dev
Build type: RelWithDebInfo
LuaJIT 2.0.4
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-Vk_ngi/neovim-0.4.0+ubuntu3+git201907152022-5193826-f1ec5d7/build/config -I/build/neovim-Vk_ngi/neovim-0.4.0+ubuntu3+git201907152022-5193826-f1ec5d7/src -I/build/neovim-Vk_ngi/neovim-0.4.0+ubuntu3+git201907152022-5193826-f1ec5d7/.deps/usr/include -I/usr/include -I/build/neovim-Vk_ngi/neovim-0.4.0+ubuntu3+git201907152022-5193826-f1ec5d7/build/src/nvim/auto -I/build/neovim-Vk_ngi/neovim-0.4.0+ubuntu3+git201907152022-5193826-f1ec5d7/build/include
Compiled by ***@***.***
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
=== Java ===
openjdk version "11.0.4-ea" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4-ea+9-post-Ubuntu-1ubuntu116.04.1)
OpenJDK 64-Bit Server VM (build 11.0.4-ea+9-post-Ubuntu-1ubuntu116.04.1, mixed mode, sharing)
19-07-17 16:29:59 moondog INFO [conjure.rpc:149] - Starting RPC TCP server on port 35339
19-07-17 16:29:59 moondog INFO [conjure.rpc:167] - Starting RPC loops
19-07-17 16:29:59 moondog INFO [conjure.prepl:196] - Started prepl server on port 38857
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :notify, :method :up, :params [""], :client :stdio}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-set-var, :params ["conjure_ready" 1]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 2, :method :nvim-get-current-buf, :params nil}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error nil, :result nil, :client :stdio}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 2, :error nil, :result #msgpack.core.Ext{:type 0, :data #object["[B" 0x5b37e33f ***@***.***"]}, :client :stdio}
19-07-17 16:29:59 moondog INFO [conjure.main:47] - Everything's ready! Let's perform some magic.
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 3, :method :nvim-call-atomic, :params [(["nvim_buf_get_name" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x5b37e33f ***@***.***"]}]] ["nvim_buf_line_count" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x5b37e33f ***@***.***"]}]] ["nvim_buf_get_lines" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x5b37e33f ***@***.***"]} 0 25 false]] ["nvim_get_current_win" []])]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 3, :error nil, :result [["/home/dave/code/api-proxy/src/adzerk/api_proxy_dev.clj" 13 ["(ns adzerk.api-proxy-dev" " \"DEVELOPMENT-ONLY entrypoint that wraps the application with a wrap-reload handler.\"" " (:require [adzerk.api-proxy :as api-proxy]" " [ring.middleware.reload :refer [wrap-reload]]" " [clojure.java.io :as io]))" "" "(def src-dirs" " (filter #(not (.endsWith % \".jar\"))" " (.split (System/getProperty \"fake.class.path\") \":\")))" "" "(def app" " (-> #'api-proxy/app" " (wrap-reload {:dirs src-dirs})))"] #msgpack.core.Ext{:type 1, :data #object["[B" 0x4101a8c5 ***@***.***"]}] nil], :client :stdio}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-call-function, :params ["getcwd" (0)]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error nil, :result "/home/dave/code/api-proxy", :client :stdio}
19-07-17 16:29:59 moondog INFO [conjure.prepl:121] - Adding :cwd 127.0.0.1 34829
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-get-var, :params ["conjure_log_auto_open"]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error nil, :result ["ret-multiline" "out" "err" "tap" "doc" "test"], :client :stdio}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-execute-lua, :params ["return require('conjure').upsert_log(...)" ("/tmp/conjure.cljc" "small" false false true)]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error [0 "Error executing lua: /home/dave/.vim/bundle/conjure//lua/conjure.lua:87: Vim(if):E482: Can't open file /tmp/user/10007d12eecc0088a7ae6e413b2dd9867a4f3aabb0807309eacc4899826f7042e53a.clj for writing: permission denied"], :result nil, :client :stdio}
19-07-17 16:29:59 moondog ERROR [conjure.nvim.api:12] - Error while making nvim call {:method :nvim-execute-lua, :params ["return require('conjure').upsert_log(...)" ("/tmp/conjure.cljc" "small" false false true)]} -> {:error [0 "Error executing lua: /home/dave/.vim/bundle/conjure//lua/conjure.lua:87: Vim(if):E482: Can't open file /tmp/user/10007d12eecc0088a7ae6e413b2dd9867a4f3aabb0807309eacc4899826f7042e53a.clj for writing: permission denied"], :result nil}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-buf-line-count, :params [nil]}
19-07-17 16:29:59 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error [0 "Wrong type for argument 1, expecting Buffer"], :result nil, :client :stdio}
19-07-17 16:29:59 moondog ERROR [conjure.nvim.api:12] - Error while making nvim call {:method :nvim-buf-line-count, :params [nil]} -> {:error [0 "Wrong type for argument 1, expecting Buffer"], :result nil}
19-07-17 16:29:59 moondog ERROR [conjure.util:63] - Error while pretty printing java.lang.Exception: :parse-string-all? requires a string!
19-07-17 16:29:59 moondog ERROR [conjure.rpc:?] - Error from thread 'RPC message handler': java.lang.NullPointerException
19-07-17 16:30:24 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :notify, :method :stop, :params [0], :client :stdio}
19-07-17 16:30:24 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-get-current-buf, :params nil}
19-07-17 16:30:24 moondog TRACE [conjure.rpc:199] - Received RPC message: {:type :response, :id 1, :error nil, :result #msgpack.core.Ext{:type 0, :data #object["[B" 0x75fc5f53 ***@***.***"]}, :client :stdio}
19-07-17 16:30:24 moondog ERROR [conjure.util:63] - Error while pretty printing java.lang.Exception: :parse-string-all? requires a string!
19-07-17 16:30:24 moondog TRACE [conjure.rpc:186] - Sending RPC message: {:type :request, :client :stdio, :id 1, :method :nvim-call-atomic, :params [(["nvim_buf_get_name" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x75fc5f53 ***@***.***"]}]] ["nvim_buf_line_count" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x75fc5f53 ***@***.***"]}]] ["nvim_buf_get_lines" [#msgpack.core.Ext{:type 0, :data #object["[B" 0x75fc5f53 ***@***.***"]} 0 25 false]] ["nvim_get_current_win" []])]}
19-07-17 16:30:24 moondog ERROR [conjure.rpc:?] - Error from thread 'RPC stdin handler': java.io.EOFException
19-07-17 16:30:24 moondog INFO [conjure.main:22] - Shutting down
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50?email_source=notifications&email_token=AACM6XPULXGPM3GGQF3Z4OTP75DPBA5CNFSM4IESLL22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7ZL5FA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACM6XKN7BGAK32WPUHWCPDP75DPBANCNFSM4IESLL2Q>
.
|
That |
Also thank you for calling it an edge case rather than a bug, that's one step away from calling it an unintended feature 😄 |
So this error is actually coming out of Conjure:
More precisely, it's coming out of the Lua function, |
So the error is coming from this: if open then
if focus ~= true then
vim.api.nvim_command("wincmd p") -- <- this line
end
else
vim.api.nvim_command("wincmd q")
end So it looks like as I try to go back to your original window it explodes. This case only happens on the initial load or if you've deleted Conjure's log buffer and it needs to make a new one. |
How's develop look for you now @daveyarwood? I basically wrapped that I'm just kinda paving over this edge case since it's not something Conjure is causing directly... as far as I can tell. |
The changes on develop do not seem to fix this issue. The behavior seems to be the same, although I haven't dug into the logs to verify if anything has changed. Here they are, in case it's helpful. Screenshot: Logs: |
Ah, that sucks 😭 okay, I'll have another dig, I'm not sure what could be causing it right now. |
Oh, did liuchengxu/vista.vim#124 fix the issue? Because I was beginning to see what vista was doing to check if it was conflicting with Conjure and it's log buffer upsert somehow. Basically that permission error was causing the log buffer to never get created which breaks all sorts of things. Luckily the upsert is run every time, so that's why it works after you attempt something else. |
Error
I ran into what looks like an edge case related to a different plugin (vista.vim) failing. Here's the
:messages
output:Conjure is working fine in general, I just run into this problem when vista fails. Here's the timeline that reliably produces the error condition:
:Vista!!
to open the vista.vim sidebar.Error from thread 'RPC message handler'
)Logs
The text was updated successfully, but these errors were encountered: