Skip to content

jakkn/NWN.ProcessEventInfiniteLoopRepro

Repository files navigation

NWN.ProcessEventInfiniteLoopRepro

Repro project for a bug in Anvil that throws System.IndexOutOfRangeException from VirtualMachine.cs::ExecuteInScriptContext after having reloaded services that contain subscriptions to events that are also subscribed to from nss.

Getting started

Run

These are the steps to reproduce the bug:

  1. Build and run
dotnet build -c Debug
./run-commands.sh # to start the interactive menu
  1. Use option 5 to pack the module
  2. Use option 1 to start the container
  3. Use option 7 to tail the server logs
  4. Log in and sell something to the merchant. This should work fine.
  5. Trigger a reload of dotnet, e.g. by starting a watcher in a separate terminal and saving a file
dotnet watch --project NWN.ProcessEventInfiniteLoopRepro/Repro.csproj build -c Debug
  1. Watch Anvil reload plugins.
  2. Try to sell something again.
  3. Observe the process crash.

Use

Use nasher to manage the sources.

A utility script named ./run-commands.sh has been added to speed up running frequent commands, inlcuding a useful watch-utility to hot compile scripts on file save (option 2).

Requirements

  • docker (with compose)
  • nasher
  • dotnet
  • entr (to hot compile nss)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors