IogaMaster / neocord

Discord Rich Presence for Neovim (Fork of presence.nvim)
MIT License
107 stars 13 forks source link

Cannot open multiple instances on Windows #20

Open Beaux44 opened 6 months ago

Beaux44 commented 6 months ago

Description

When attempting to open multiple instances on Windows, the first instance immediately hard crashes with this error: Assertion failed: count && count <= buf->size, file D:\a\neovim\neovim\src\nvim\rbuffer.c, line 144

There is no output from the first instance after starting the second instance besides this error. It seems to occur when attempting to write to the remote nvim instance. I found that this is a known and fixed issue on neovim nightly (as of Mar 21st), but it's usually caused by malformed RPC/msgpack data as far as I could tell. When outputting the packed command data, I got the result '<94>. I don't have more time to look into this at the moment but I can look at this more later in about a week if nobody figures it out by then.

Neovim version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1703942320

OS information

Windows 11

Steps to reproduce

  1. Setup neocord on Windows
  2. Attempt to open two instances

Logs

Details First instance: ``` [neocord] Setting up plugin for windows [neocord] Using Discord IPC socket path: \.pipediscord-ipc-0 [neocord] Checking Discord IPC socket at \.pipediscord-ipc-0... [neocord] Using id 70f08fa0-58bf-4ba4-895f-95a1e0a0bb5a [neocord] Completed plugin setup [neocord] Getting nvim socket paths... [neocord] Executing command: `powershell.exe, -Command, (Get-ChildItem \.pipe).FullName | findstr 'nvim'` [neocord] Found unexpected Discord IPC socket type: nil [neocord] Handling BufEnter event... [neocord] Connecting to Discord... [neocord] Handling UIEnter event... [neocord] Currently connecting with Discord, scheduling callback for later... [neocord] Connected to Discord [neocord] Authorizing with Discord... [neocord] Wrote message to pipe [neocord] Parsed filename nil with no extension [neocord] No status text for the given buffer, skipping... [neocord] Got nvim socket paths: {} [neocord] No other remote nvim instances [neocord] Failed to decode payload: '{^A [neocord] Authorized with Discord [neocord] Parsed filename nil with no extension [neocord] No status text for the given buffer, skipping... [neocord] Handling WinLeave event... [neocord] Handling WinEnter event... [neocord] Handling BufEnter event... [neocord] Handling TextChanged event... [neocord] Not canceling neocord due to switching to a window within the same instance... [neocord] Parsed filename nil with no extension [neocord] Getting project name for nil... [neocord] Setting activity for unnamed buffer... [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Parsed filename nil with no extension [neocord] Getting project name for nil... [neocord] Setting activity for unnamed buffer... [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Parsed filename nil with no extension [neocord] Getting project name for nil... [neocord] Setting activity for unnamed buffer... [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Wrote message to pipe [neocord] Wrote message to pipe [neocord] Wrote message to pipe [neocord] Set activity in Discord for nil [neocord] Set activity in Discord for nil [neocord] Set activity in Discord for nil [neocord] Handling WinLeave event... [neocord] Handling WinEnter event... [neocord] Handling BufEnter event... [neocord] Handling BufAdd event... [neocord] Handling BufEnter event... [neocord] Not canceling neocord due to switching to a window within the same instance... [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Wrote message to pipe [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Wrote message to pipe [neocord] Wrote message to pipe [neocord] Set activity in Discord for init.lua [neocord] Wrote message to pipe [neocord] Set activity in Discord for init.lua [neocord] Set activity in Discord for init.lua [neocord] Set activity in Discord for init.lua [neocord] Handling TextChanged event... [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Wrote message to pipe [neocord] Set activity in Discord for init.lua [neocord] Handling FocusGained event... [neocord] Parsed filename init.lua with lua extension [neocord] Getting project name for C:Users^HeauxAppDataLocal^@vim... [neocord] Not a git repository, skipping... [neocord] Setting activity for C:Users^HeauxAppDataLocal^@viminit.lua... [neocord] Using file asset: { "Lua", "lua" } [neocord] No project detected [neocord] Sync activity to all peers... [neocord] Setting Discord activity... [neocord] Wrote message to pipe [neocord] Set activity in Discord for init.lua ``` Second instance: ``` [neocord] Setting up plugin for windows [neocord] Using Discord IPC socket path: \.pipediscord-ipc-0 [neocord] Checking Discord IPC socket at \.pipediscord-ipc-0... [neocord] Using id 77d4aea4-caee-47a7-96c1-a6e8e578a978 [neocord] Completed plugin setup [neocord] Getting nvim socket paths... [neocord] Executing command: `powershell.exe, -Command, (Get-ChildItem \.pipe).FullName | findstr 'nvim'` [neocord] Found unexpected Discord IPC socket type: nil [neocord] Handling BufEnter event... [neocord] Connecting to Discord... [neocord] Handling UIEnter event... [neocord] Currently connecting with Discord, scheduling callback for later... [neocord] Connected to Discord [neocord] Authorizing with Discord... [neocord] Wrote message to pipe [neocord] Parsed filename nil with no extension [neocord] No status text for the given buffer, skipping... [neocord] Got nvim socket paths: { "\\.\pipe\nvim.8396.0" } [neocord] Registering as a new peer to 1 instance(s)... [neocord] Connected to remote nvim instance at \.pipe^@vim.8396.0 [neocord] Wrote to remote nvim instance: \.pipe^@vim.8396.0 [neocord] Failed to decode payload: '{^A [neocord] Authorized with Discord [neocord] Parsed filename nil with no extension [neocord] No status text for the given buffer, skipping... ```
Beaux44 commented 6 months ago

@IogaMaster This is not completed

IogaMaster commented 6 months ago

The pr didn't fix it?

Beaux44 commented 6 months ago

No my previous PRs were related to workspaces not showing and the error caused by fugitive, this issue is about neovim instantly crashing when attempting to open multiple instances. I just started working on figuring out what's causing this issue today.

IogaMaster commented 6 months ago

Oh alr, I havent used windows in like 7 years