LordOfTrident / cordmus

Discord Rich Presence for Cmus written in Nim
MIT License
6 stars 0 forks source link

[BUG] while leaving cmus paused for a while cordmus crashes #1

Open shadow-absorber opened 1 week ago

shadow-absorber commented 1 week ago

here is the output to console

./cordmus
/home/sam_tunder/git/cordmus/src/cordmus.nim(142) cordmus
/home/sam_tunder/.nimble/pkgs2/cligen-1.7.8-1261a00456f7837bd34eefa24f4f13c0fc9a6545/cligen.nim(906) cligenScope
/home/sam_tunder/.nimble/pkgs2/cligen-1.7.8-1261a00456f7837bd34eefa24f4f13c0fc9a6545/cligen.nim(865) dispatchcordmus
/home/sam_tunder/git/cordmus/src/cordmus.nim(136) cordmus
/home/sam_tunder/git/cordmus/src/cordmus.nim(84) update
/home/sam_tunder/.nimble/pkgs2/discord_rpc-0.2.0-d3c707a1e8b032d8625828d0fde6ddaae1419f00/discord_rpc.nim(846) setActivity
/home/sam_tunder/.nimble/pkgs2/discord_rpc-0.2.0-d3c707a1e8b032d8625828d0fde6ddaae1419f00/discord_rpc.nim(697) send
/home/sam_tunder/.nimble/pkgs2/discord_rpc-0.2.0-d3c707a1e8b032d8625828d0fde6ddaae1419f00/discord_rpc.nim(691) send
/home/sam_tunder/.nimble/pkgs2/discord_rpc-0.2.0-d3c707a1e8b032d8625828d0fde6ddaae1419f00/discord_rpc.nim(282) write
/usr/lib/nim/std/assertions.nim(41) failedAssertImpl
/usr/lib/nim/std/assertions.nim(36) raiseAssert
/usr/lib/nim/system/fatal.nim(53) sysFatal
Error: unhandled exception: /home/sam_tunder/.nimble/pkgs2/discord_rpc-0.2.0-d3c707a1e8b032d8625828d0fde6ddaae1419f00/discord_rpc.nim(282, 5) `s.send(unsafeAddr payload[0], payload.len) == payload.len`  [AssertionDefect]
LordOfTrident commented 4 days ago

Sorry, i havent had the time to look into this until now.

This error is generic and actually happened with another bug i encountered where an ascii double quote " in a song title caused this error to be thrown. I solved that (temporarily) by replacing ascii double quotes with unicode ones in cordmus. The error is something from the underlying Nim Discord RPC library im using and i have no idea what it is, as i havent gotten around to dig around the library or report an issue on their github yet. Ive had cmus paused for a while before but i never encountered this issue. Can you provide some more details, like what is the title/album name of the song song you paused cmus at, how long did you have it paused for, or if you can replicate it again?