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

Debugger occasionally crashes with Sequence Number Mismatch #468

Open
osirisOfGit opened this issue Oct 18, 2024 · 3 comments
Open

Debugger occasionally crashes with Sequence Number Mismatch #468

osirisOfGit opened this issue Oct 18, 2024 · 3 comments

Comments

@osirisOfGit
Copy link
Contributor

osirisOfGit commented Oct 18, 2024

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 10

Platform

GOG

Description

While using the Lua debugger and reloading saves frequently, the debugger will crash with:

System.IO.InvalidDataException: NSE sequence number mismatch; got {x} expected {x - 1}

actual message is:

System.IO.InvalidDataException: NSE sequence number mismatch; got 6969 expected 6968
   at NSE.DebuggerFrontend.DebuggerClient.MessageReceived(BackendToDebugger message)
   at NSE.DebuggerFrontend.AsyncProtobufClient.RunLoop()
   at NSE.DebuggerFrontend.DAPMessageHandler.DebugThreadMain()

but the sequence number changes each time

This happens when using no mods, using a couple mods, and using a lot of mods.

This happens with Steam and GOG version

Indications

Happens exclusively when running the Lua Debugger, and the exception details that it's NSE (presumably Norbyte's Script Extender)

Diagnostic Files

BG3 Diagnostic Data.txt

Steps to Reproduce

  1. Install latest Debugger artifacts and extension per https://github.com/Norbyte/bg3se/blob/main/Docs/Debugger.md
  2. Start a game through VSCode, allowing the Debugger to hook up
  3. Load into a save
  4. Quick-load that save a bunch of times. Eventually it will crash - how long it takes varies significantly. Sometimes it happens every 3 loads, sometimes every 10-15

Expected Behavior

Not crashing

Actual Behavior

Game crashes completely

@osirisOfGit
Copy link
Contributor Author

osirisOfGit commented Oct 18, 2024

Additional note - the more time i wait between loads (like, 5+ minutes it looks like), the less likely it is that this behavior occurs (also, i'm loading saves frequently because i'm dealing with a situation where reset doesn't help me, e.g. testing behavior on entering combat)

@osirisOfGit
Copy link
Contributor Author

Partial correction - the debugger crash doesn't make the game crash, it was just triggering the postDebugTask in my VSCode launch.json and shutting down BG3. Commenting that out lets the debugger crash in isolation, allowing me to reconnect it to the game after

@Norbyte
Copy link
Owner

Norbyte commented Oct 21, 2024

This is a known issue that usually happens when the client/server concurrently send updates through the DAP; a fix is planned but since it requires a rework of the networking logic I'm not sure when it will be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants