Skip to content
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

this.logger.info() sends data to nvim.exe (with ALLOW_CONSOLE) #342

Closed
saidelike opened this issue Mar 26, 2024 · 5 comments · Fixed by #345
Closed

this.logger.info() sends data to nvim.exe (with ALLOW_CONSOLE) #342

saidelike opened this issue Mar 26, 2024 · 5 comments · Fixed by #345
Labels

Comments

@saidelike
Copy link

node-client: 5.1.0
nvim: nvim-win64-0.9.5-RelWithDebInfo-LuaJIT-2.1.1703942320.msi

C:\>npm list -g
+-- [email protected]

Creating a new issue different from #329 because now it effectively logs in the log file, but it also crashes neovim still. Just to be clear with the previous issue, it wouldn't log properly as I would get {"level":"info","message":"handleRequest: "} instead of 2024-03-26 10:06:42 INF handleRequest: .

note that this is testing with a remote plugin.

0:005> .reload /f nvim.exe
*** WARNING: Unable to verify checksum for C:\Program Files\Neovim\bin\nvim.exe
0:005> bp nvim!receive_msgpack+0xad ".printf \"size: 0x%lx\\n\", poi(rdi+6c0); db poi(rdi+6b8); g"
0:005> g
size: 0x7b
00000226`819fc7e5  6e 64 69 66 94 00 1a c4-09 76 69 6d 5f 69 6e 70  ndif.....vim_inp
00000226`819fc7f5  75 74 91 c4 11 3c 4c 65-66 74 4d 6f 75 73 65 3e  ut...<LeftMouse>
00000226`819fc805  3c 39 39 2c 31 3e 01 30-c4 05 6d 69 6e 6f 72 c4  <99,1>.0..minor.
00000226`819fc815  01 32 c4 05 70 61 74 63-68 c4 02 31 37 c4 02 75  .2..patch..17..u
00000226`819fc825  69 80 82 c4 0d 67 75 69-2d 63 6c 69 70 62 6f 61  i....gui-clipboa
00000226`819fc835  72 64 c3 c4 08 77 69 6e-64 6f 77 69 64 ce 01 4c  rd...windowid..L
00000226`819fc845  0d c2 94 00 0c c4 0b 76-69 6d 5f 73 65 74 5f 76  .......vim_set_v
00000226`819fc855  61 72 92 c4 07 47 75 69-46 6f 6e 74 c4 0c 43 6f  ar...GuiFont..Co
size: 0x24
00000226`819fc80b  01 30 c4 05 6d 69 6e 6f-72 c4 01 32 c4 05 70 61  .0..minor..2..pa
00000226`819fc81b  74 63 68 c4 02 31 37 c4-02 75 69 80 82 c4 0d 67  tch..17..ui....g
00000226`819fc82b  75 69 2d 63 6c 69 70 62-6f 61 72 64 c3 c4 08 77  ui-clipboard...w
00000226`819fc83b  69 6e 64 6f 77 69 64 ce-01 4c 0d c2 94 00 0c c4  indowid..L......
00000226`819fc84b  0b 76 69 6d 5f 73 65 74-5f 76 61 72 92 c4 07 47  .vim_set_var...G
00000226`819fc85b  75 69 46 6f 6e 74 c4 0c-43 6f 6e 73 6f 6c 61 73  uiFont..Consolas
00000226`819fc86b  3a 68 31 31 94 00 0d c4-14 6e 76 69 6d 5f 73 65  :h11.....nvim_se
00000226`819fc87b  74 5f 63 6c 69 65 6e 74-5f 69 6e 66 6f 95 c4 07  t_client_info...
size: 0x55
00000226`819fc7b4  4c 6f 73 74 27 29 20 7c-20 64 6f 61 75 74 6f 63  Lost') | doautoc
00000226`819fc7c4  6d 64 20 3c 6e 6f 6d 6f-64 65 6c 69 6e 65 3e 20  md <nomodeline> 
00000226`819fc7d4  46 6f 63 75 73 4c 6f 73-74 20 7c 20 65 6e 64 69  FocusLost | endi
00000226`819fc7e4  66 6e 64 69 66 94 00 1a-c4 09 76 69 6d 5f 69 6e  fndif.....vim_in
00000226`819fc7f4  70 75 74 91 c4 11 3c 4c-65 66 74 4d 6f 75 73 65  put...<LeftMouse
00000226`819fc804  3e 3c 39 39 2c 31 3e 01-30 c4 05 6d 69 6e 6f 72  ><99,1>.0..minor
00000226`819fc814  c4 01 32 c4 05 70 61 74-63 68 c4 02 31 37 c4 02  ..2..patch..17..
00000226`819fc824  75 69 80 82 c4 0d 67 75-69 2d 63 6c 69 70 62 6f  ui....gui-clipbo
size: 0x16
00000000`00000000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
00000000`00000070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
size: 0x29
00000226`8381a696  46 20 68 61 6e 64 6c 65-52 65 71 75 65 73 74 3a  F handleRequest:
00000226`8381a6a6  20 0d 0a 00 00 00 00 00-00 00 00 00 00 00 00 00   ...............
00000226`8381a6b6  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00000226`8381a6c6  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00000226`8381a6d6  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00000226`8381a6e6  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00000226`8381a6f6  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
00000226`8381a706  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
(6cb0.5514): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
ucrtbase!abort+0x4e:
00007ffa`1712286e cd29            int     29h
0:000> k
 # Child-SP          RetAddr               Call Site
00 000000a3`96336df0 00007ffa`1712426e     ucrtbase!abort+0x4e
01 000000a3`96336e20 00007ffa`17124165     ucrtbase!common_assert_to_stderr_direct+0xb2
02 000000a3`96337310 00007ffa`171244f1     ucrtbase!common_assert_to_stderr<wchar_t>+0x1d
03 000000a3`96337350 00007ff7`9e0115bb     ucrtbase!wassert+0x71
04 000000a3`96337380 00007ff7`9e01165f     nvim!rbuffer_consumed+0x4b [D:\a\neovim\neovim\src\nvim\rbuffer.c @ 144] 
05 000000a3`963373b0 00007ff7`9dfc629b     nvim!rbuffer_consumed_compact+0x3f [D:\a\neovim\neovim\src\nvim\rbuffer.c @ 167] 
06 000000a3`963373e0 00007ff7`9df2f16c     nvim!receive_msgpack+0xcb [D:\a\neovim\neovim\src\nvim\msgpack_rpc\channel.c @ 311] 
07 000000a3`96337540 00007ff7`9df2f25f     nvim!read_event+0x3c [D:\a\neovim\neovim\src\nvim\event\rstream.c @ 194] 
08 000000a3`96337580 00007ff7`9df2efcf     nvim!invoke_read_cb+0xbf [D:\a\neovim\neovim\src\nvim\event\rstream.c @ 211] 
09 000000a3`963376a0 00007ff7`9e12db72     nvim!read_cb+0x6f [D:\a\neovim\neovim\src\nvim\event\rstream.c @ 135] 
0a 000000a3`963376d0 00007ff7`9e12ea42     nvim!uv__pipe_read_data+0xb2 [D:\a\neovim\neovim\.deps\build\src\libuv\src\win\pipe.c @ 1954] 
0b 000000a3`96337730 00007ff7`9e12b78d     nvim!uv__process_pipe_read_req+0x122 [D:\a\neovim\neovim\.deps\build\src\libuv\src\win\pipe.c @ 2084] 
0c (Inline Function) --------`--------     nvim!uv__process_reqs+0x90 [D:\a\neovim\neovim\.deps\build\src\libuv\src\win\req-inl.h @ 159] 
0d 000000a3`96337780 00007ff7`9df2cc6a     nvim!uv_run+0x19d [D:\a\neovim\neovim\.deps\build\src\libuv\src\win\core.c @ 658] 
0e 000000a3`963377c0 00007ff7`9df2ccc5     nvim!loop_uv_run+0x8a [D:\a\neovim\neovim\src\nvim\event\loop.c @ 66] 
0f 000000a3`96337800 00007ff7`9dfc5fc5     nvim!loop_poll_events+0x15 [D:\a\neovim\neovim\src\nvim\event\loop.c @ 88] 
10 000000a3`96337830 00007ff7`9df15e6d     nvim!rpc_send_call+0x1e5 [D:\a\neovim\neovim\src\nvim\msgpack_rpc\channel.c @ 210] 
11 000000a3`963378d0 00007ff7`9df0aedb     nvim!f_rpcrequest+0x29d [D:\a\neovim\neovim\src\nvim\eval\funcs.c @ 6636] 
12 000000a3`96337a00 00007ff7`9df23dba     nvim!call_internal_func+0x8b [D:\a\neovim\neovim\src\nvim\eval\funcs.c @ 244] 
13 000000a3`96337a30 00007ff7`9df22235     nvim!call_func+0x35a [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1622] 
14 000000a3`96337ca0 00007ff7`9def57d0     nvim!get_func_tv+0x165 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 497] 
15 000000a3`96337e90 00007ff7`9def683c     nvim!eval_func+0xd0 [D:\a\neovim\neovim\src\nvim\eval.c @ 2195] 
16 000000a3`96337f60 00007ff7`9def6315     nvim!eval7+0x2cc [D:\a\neovim\neovim\src\nvim\eval.c @ 3000] 
17 000000a3`96337fd0 00007ff7`9def6036     nvim!eval6+0x55 [D:\a\neovim\neovim\src\nvim\eval.c @ 2742] 
18 000000a3`96338090 00007ff7`9def5d22     nvim!eval5+0x46 [D:\a\neovim\neovim\src\nvim\eval.c @ 2597] 
19 000000a3`963381d0 00007ff7`9def5c8d     nvim!eval4+0x22 [D:\a\neovim\neovim\src\nvim\eval.c @ 2467] 
1a 000000a3`96338220 00007ff7`9def5aab     nvim!eval3+0xcd [D:\a\neovim\neovim\src\nvim\eval.c @ 2420] 
1b 000000a3`96338270 00007ff7`9def5976     nvim!eval2+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2342] 
1c 000000a3`963382c0 00007ff7`9def5898     nvim!eval1+0x26 [D:\a\neovim\neovim\src\nvim\eval.c @ 2280] 
1d 000000a3`96338310 00007ff7`9def3275     nvim!eval0+0x58 [D:\a\neovim\neovim\src\nvim\eval.c @ 2236] 
1e 000000a3`96338360 00007ff7`9df469b0     nvim!eval_to_bool+0x35 [D:\a\neovim\neovim\src\nvim\eval.c @ 709] 
1f 000000a3`963383a0 00007ff7`9df3ba02     nvim!ex_if+0x90 [D:\a\neovim\neovim\src\nvim\ex_eval.c @ 818] 
20 000000a3`963383d0 00007ff7`9df3cbd2     nvim!execute_cmd0+0x1d2 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 1622] 
21 000000a3`96338420 00007ff7`9df3a11c     nvim!do_one_cmd+0xa42 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 2282] 
22 000000a3`96338670 00007ff7`9df23202     nvim!do_cmdline+0x67c [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 579] 
23 000000a3`96338ce0 00007ff7`9df2363d     nvim!call_user_func+0x7c2 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1126] 
24 000000a3`963390e0 00007ff7`9df23eb4     nvim!call_user_func_check+0xad [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1261] 
25 000000a3`96339130 00007ff7`9df22235     nvim!call_func+0x454 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1632] 
26 000000a3`963393a0 00007ff7`9def57d0     nvim!get_func_tv+0x165 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 497] 
27 000000a3`96339590 00007ff7`9def683c     nvim!eval_func+0xd0 [D:\a\neovim\neovim\src\nvim\eval.c @ 2195] 
28 000000a3`96339660 00007ff7`9def6315     nvim!eval7+0x2cc [D:\a\neovim\neovim\src\nvim\eval.c @ 3000] 
29 000000a3`963396d0 00007ff7`9def6036     nvim!eval6+0x55 [D:\a\neovim\neovim\src\nvim\eval.c @ 2742] 
2a 000000a3`96339790 00007ff7`9def5d22     nvim!eval5+0x46 [D:\a\neovim\neovim\src\nvim\eval.c @ 2597] 
2b 000000a3`963398d0 00007ff7`9def5beb     nvim!eval4+0x22 [D:\a\neovim\neovim\src\nvim\eval.c @ 2467] 
2c 000000a3`96339920 00007ff7`9def5aab     nvim!eval3+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2399] 
2d 000000a3`96339970 00007ff7`9def5976     nvim!eval2+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2342] 
2e 000000a3`963399c0 00007ff7`9def5898     nvim!eval1+0x26 [D:\a\neovim\neovim\src\nvim\eval.c @ 2280] 
2f 000000a3`96339a10 00007ff7`9df26422     nvim!eval0+0x58 [D:\a\neovim\neovim\src\nvim\eval.c @ 2236] 
30 000000a3`96339a60 00007ff7`9df3ba02     nvim!ex_return+0x82 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 2962] 
31 000000a3`96339aa0 00007ff7`9df3cbd2     nvim!execute_cmd0+0x1d2 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 1622] 
32 000000a3`96339af0 00007ff7`9df3a11c     nvim!do_one_cmd+0xa42 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 2282] 
33 000000a3`96339d40 00007ff7`9df23202     nvim!do_cmdline+0x67c [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 579] 
34 000000a3`9633a3b0 00007ff7`9df2363d     nvim!call_user_func+0x7c2 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1126] 
35 000000a3`9633a7b0 00007ff7`9df23eb4     nvim!call_user_func_check+0xad [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1261] 
36 000000a3`9633a800 00007ff7`9df23843     nvim!call_func+0x454 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1632] 
37 000000a3`9633aa70 00007ff7`9df0b94a     nvim!func_call+0x123 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1411] 
38 000000a3`9633acb0 00007ff7`9df0aedb     nvim!f_call+0xda [D:\a\neovim\neovim\src\nvim\eval\funcs.c @ 583] 
39 000000a3`9633ad00 00007ff7`9df23dba     nvim!call_internal_func+0x8b [D:\a\neovim\neovim\src\nvim\eval\funcs.c @ 244] 
3a 000000a3`9633ad30 00007ff7`9df22235     nvim!call_func+0x35a [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1622] 
3b 000000a3`9633afa0 00007ff7`9def57d0     nvim!get_func_tv+0x165 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 497] 
3c 000000a3`9633b190 00007ff7`9def683c     nvim!eval_func+0xd0 [D:\a\neovim\neovim\src\nvim\eval.c @ 2195] 
3d 000000a3`9633b260 00007ff7`9def6315     nvim!eval7+0x2cc [D:\a\neovim\neovim\src\nvim\eval.c @ 3000] 
3e 000000a3`9633b2d0 00007ff7`9def6036     nvim!eval6+0x55 [D:\a\neovim\neovim\src\nvim\eval.c @ 2742] 
3f 000000a3`9633b390 00007ff7`9def5d22     nvim!eval5+0x46 [D:\a\neovim\neovim\src\nvim\eval.c @ 2597] 
40 000000a3`9633b4d0 00007ff7`9def5beb     nvim!eval4+0x22 [D:\a\neovim\neovim\src\nvim\eval.c @ 2467] 
41 000000a3`9633b520 00007ff7`9def5aab     nvim!eval3+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2399] 
42 000000a3`9633b570 00007ff7`9def5976     nvim!eval2+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2342] 
43 000000a3`9633b5c0 00007ff7`9def5898     nvim!eval1+0x26 [D:\a\neovim\neovim\src\nvim\eval.c @ 2280] 
44 000000a3`9633b610 00007ff7`9df27c28     nvim!eval0+0x58 [D:\a\neovim\neovim\src\nvim\eval.c @ 2236] 
45 000000a3`9633b660 00007ff7`9df3ba02     nvim!ex_let_const+0x218 [D:\a\neovim\neovim\src\nvim\eval\vars.c @ 263] 
46 000000a3`9633b6f0 00007ff7`9df3cbd2     nvim!execute_cmd0+0x1d2 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 1622] 
47 000000a3`9633b740 00007ff7`9df3a11c     nvim!do_one_cmd+0xa42 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 2282] 
48 000000a3`9633b990 00007ff7`9df23202     nvim!do_cmdline+0x67c [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 579] 
49 000000a3`9633c000 00007ff7`9df2363d     nvim!call_user_func+0x7c2 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1126] 
4a 000000a3`9633c400 00007ff7`9df23eb4     nvim!call_user_func_check+0xad [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1261] 
4b 000000a3`9633c450 00007ff7`9df22235     nvim!call_func+0x454 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1632] 
4c 000000a3`9633c6c0 00007ff7`9def57d0     nvim!get_func_tv+0x165 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 497] 
4d 000000a3`9633c8b0 00007ff7`9def683c     nvim!eval_func+0xd0 [D:\a\neovim\neovim\src\nvim\eval.c @ 2195] 
4e 000000a3`9633c980 00007ff7`9def6315     nvim!eval7+0x2cc [D:\a\neovim\neovim\src\nvim\eval.c @ 3000] 
4f 000000a3`9633c9f0 00007ff7`9def6036     nvim!eval6+0x55 [D:\a\neovim\neovim\src\nvim\eval.c @ 2742] 
50 000000a3`9633cab0 00007ff7`9def5d22     nvim!eval5+0x46 [D:\a\neovim\neovim\src\nvim\eval.c @ 2597] 
51 000000a3`9633cbf0 00007ff7`9def5beb     nvim!eval4+0x22 [D:\a\neovim\neovim\src\nvim\eval.c @ 2467] 
52 000000a3`9633cc40 00007ff7`9def5aab     nvim!eval3+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2399] 
53 000000a3`9633cc90 00007ff7`9def5976     nvim!eval2+0x2b [D:\a\neovim\neovim\src\nvim\eval.c @ 2342] 
54 000000a3`9633cce0 00007ff7`9def5898     nvim!eval1+0x26 [D:\a\neovim\neovim\src\nvim\eval.c @ 2280] 
55 000000a3`9633cd30 00007ff7`9df27c28     nvim!eval0+0x58 [D:\a\neovim\neovim\src\nvim\eval.c @ 2236] 
56 000000a3`9633cd80 00007ff7`9df3ba02     nvim!ex_let_const+0x218 [D:\a\neovim\neovim\src\nvim\eval\vars.c @ 263] 
57 000000a3`9633ce10 00007ff7`9df3cbd2     nvim!execute_cmd0+0x1d2 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 1622] 
58 000000a3`9633ce60 00007ff7`9df3a11c     nvim!do_one_cmd+0xa42 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 2282] 
59 000000a3`9633d0b0 00007ff7`9df23202     nvim!do_cmdline+0x67c [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 579] 
5a 000000a3`9633d720 00007ff7`9df2363d     nvim!call_user_func+0x7c2 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1126] 
5b 000000a3`9633db20 00007ff7`9df23eb4     nvim!call_user_func_check+0xad [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1261] 
5c 000000a3`9633db70 00007ff7`9df22235     nvim!call_func+0x454 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1632] 
5d 000000a3`9633dde0 00007ff7`9df266c4     nvim!get_func_tv+0x165 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 497] 
5e 000000a3`9633dfd0 00007ff7`9df3ba02     nvim!ex_call+0x214 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 3074] 
5f 000000a3`9633e0f0 00007ff7`9df3cbd2     nvim!execute_cmd0+0x1d2 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 1622] 
60 000000a3`9633e140 00007ff7`9df3a11c     nvim!do_one_cmd+0xa42 [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 2282] 
61 000000a3`9633e390 00007ff7`9deba242     nvim!do_cmdline+0x67c [D:\a\neovim\neovim\src\nvim\ex_docmd.c @ 579] 
62 000000a3`9633ea00 00007ff7`9deb9c07     nvim!apply_autocmds_group+0x4b2 [D:\a\neovim\neovim\src\nvim\autocmd.c @ 1954] 
63 000000a3`9633eba0 00007ff7`9df23de5     nvim!apply_autocmds+0x27 [D:\a\neovim\neovim\src\nvim\autocmd.c @ 1615] 
64 000000a3`9633ebf0 00007ff7`9deb01f1     nvim!call_func+0x385 [D:\a\neovim\neovim\src\nvim\eval\userfunc.c @ 1593] 
65 000000a3`9633ee60 00007ff7`9deb02e0     nvim!_call_function+0x1c1 [D:\a\neovim\neovim\src\nvim\api\vimscript.c @ 238] 
66 000000a3`9633f100 00007ff7`9de82672     nvim!nvim_call_function+0x40 [D:\a\neovim\neovim\src\nvim\api\vimscript.c @ 271] 
67 000000a3`9633f190 00007ff9`ed1a2cb0     nvim!nlua_api_nvim_call_function+0x102 [D:\a\neovim\neovim\build\src\nvim\auto\lua_api_c_bindings.generated.c @ 5679] 
68 000000a3`9633f270 00007ff9`ed1a8b5a     lua51+0x2cb0
69 000000a3`9633f2c0 00007ff7`9df88264     lua51!lua_pcall+0xaa
6a 000000a3`9633f2f0 00007ff7`9df8bab5     nvim!nlua_pcall+0x74 [D:\a\neovim\neovim\src\nvim\lua\executor.c @ 159] 
6b 000000a3`9633f320 00007ff7`9e03737f     nvim!nlua_exec_file+0x285 [D:\a\neovim\neovim\src\nvim\lua\executor.c @ 1804] 
6c 000000a3`9633f360 00007ff7`9de74799     nvim!do_source+0x45f [D:\a\neovim\neovim\src\nvim\runtime.c @ 2151] 
6d 000000a3`9633f470 00007ff7`9de74b9e     nvim!do_user_initialization+0x99 [D:\a\neovim\neovim\src\nvim\main.c @ 1991] 
6e 000000a3`9633f4f0 00007ff7`9de71b4f     nvim!source_startup_scripts+0x7e [D:\a\neovim\neovim\src\nvim\main.c @ 2104] 
6f 000000a3`9633f520 00007ff7`9e14a890     nvim!wmain+0x63f [D:\a\neovim\neovim\src\nvim\main.c @ 449] 
70 (Inline Function) --------`--------     nvim!invoke_main+0x22 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 90] 
71 000000a3`9633f7a0 00007ffa`18f17344     nvim!__scrt_common_main_seh+0x10c [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
72 000000a3`9633f7e0 00007ffa`199626b1     KERNEL32!BaseThreadInitThunk+0x14
73 000000a3`9633f810 00000000`00000000     ntdll!RtlUserThreadStart+0x21

and the log file:

2024-03-26 10:06:42 INF handleRequest: 
@saidelike saidelike changed the title console.log() crashes Nvim console.log() still sends data to nvim.exe Mar 26, 2024
@saidelike
Copy link
Author

I believe the culprit logging is

this.logger.info('handleRequest: ', method);

@saidelike saidelike changed the title console.log() still sends data to nvim.exe this.logger.info() sends data to nvim.exe Mar 26, 2024
@justinmk
Copy link
Member

logger.info never writes to stdio unless you set ALLOW_CONSOLE.

What are the exact, minimal steps to reproduce the issue?

@saidelike
Copy link
Author

Yes I can confirm it only happens when ALLOW_CONSOLE=1. Without it, it does not trigger. I don't need it for remote plugins so it is not blocking for me. I only had it enabled because I tested the demo example previously.

@saidelike
Copy link
Author

saidelike commented Mar 26, 2024

To reproduce the issue, set ALLOW_CONSOLE=1, create an empty remote plugin, load it and let logger.info being called which will write onto stdout. Maybe it is expected but it should probably be documented. Especially because it crashes node.exe #343

@justinmk
Copy link
Member

ALLOW_CONSOLE=1 by definition will break a RPC channel because the "console" is stdout, which is also the RPC channel.

It's documented at https://github.com/neovim/node-client?tab=readme-ov-file#logging but I'll make it clearer.

@justinmk justinmk changed the title this.logger.info() sends data to nvim.exe this.logger.info() sends data to nvim.exe (with ALLOW_CONSOLE) Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants