Skip to content

Anvil crash of doom happening #24

Description

@McSharidan

Mod: The Working Classes
Mod version: 1.0.5
Game version: 1.22.3

In the comments on the mod DB several people have reported a severe crash issue with "The Working Classes" regarding the anvil. Placing an anvil or just looking at an existing anvil, causes "The Working Classes" to crash the game completely. Because the player is last recorded looking at the anvil, this causes the player to become perpetually locked into an endless cycle of crashing, from which there is no escape.

From the looks of an attached crash report, an attempt is made to key a Dictionary with a key that has a null value. Don't expect that your keys and values will always exist - make sure. Null reference exceptions are far too frequent a mistake that cuses severe issues.

I have been looking at "The Working Classes" as the most promising class mod for our community server, however with this anvil crash of doom problem linked to a null reference Dictionary lookup, I will not be installing "The Working Classes" until this issue has been fixed.

Please go through your code and embed proper error catching where ever you are pulling strings and objects from somewhere outside your own code, including from the Vintage Story API. There is never a guarantee that pulled data will exist - always null-check things before you attempt to reference anything or you will see things like this.

I have attached the crash report posted to the comments from Deathsblow:

Running on 64 bit Windows 10.0.26200.0 with 130969 MB RAM
Game Version: v1.22.3 (Stable)
7/5/2026 12:02:56 PM: Critical error occurred
Loaded Mods: chiseltools@1.17.3, claimnavigator@1.2.0, primitivesurvival@5.0.6, stonequarryrepckfipil@3.6.3, translocatorengineeringredux@1.6.6, game@1.22.3, vsimgui@1.2.7, zoombuttonreborn@2.0.2, accessibilitytweaks@5.0.0, achievements@1.1.0, aculinaryartillery@2.0.0-dev.21, autolootreforged@1.0.6, betterruins@0.6.3, butchering@1.13.5, carryon@1.14.2, claimsradar@1.1.1, configlib@1.12.0, critcherscalculator@1.2.3, extrainfo@2.2.1, gimap@1.7.0, hudclockpatch@4.4.1, improvedhandbookrecipes@1.1.3, knapster@4.0.0, traitacquirermoddedclasses@0.9.15, vanity@2.4.8, creative@1.22.3, survival@1.22.3, expandedfoods@2.0.0-dev.12, em@3.7.0, theworkingclasses@1.0.5
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Vintagestory.GameContent.ItemIngot.GetRequiredAnvilTier(ItemStack stack) in VSSurvivalMod\Item\ItemIngot.cs:line 32
at Vintagestory.GameContent.BlockAnvil.<>c__DisplayClass11_0.<GetPlacedBlockInteractionHelp>b__1(ItemStack stack) in VSSurvivalMod\Block\BlockAnvil.cs:line 98
at System.Linq.Enumerable.ListWhereIterator`1.MoveNext()
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at Vintagestory.GameContent.BlockAnvil.<GetPlacedBlockInteractionHelp>b__11_0() in VSSurvivalMod\Block\BlockAnvil.cs:line 98
at Vintagestory.API.Util.ObjectCacheUtil.GetOrCreate[T](ICoreAPI api, String key, CreateCachableObjectDelegate`1 onRequireCreate) in VintagestoryApi\Util\ObjectCacheUtil.cs:line 23
at Vintagestory.GameContent.BlockAnvil.GetPlacedBlockInteractionHelp(IWorldAccessor world, BlockSelection selection, IPlayer forPlayer) in VSSurvivalMod\Block\BlockAnvil.cs:line 85
at Vintagestory.Client.NoObf.HudElementInteractionHelp.getWorldInteractions() in VintagestoryLib\Client\Systems\Gui\Huds\HudElementInteractionHelp.cs:line 306
at Vintagestory.Client.NoObf.HudElementInteractionHelp.ComposeBlockWorldInteractionHelp() in VintagestoryLib\Client\Systems\Gui\Huds\HudElementInteractionHelp.cs:line 294
at Vintagestory.Client.NoObf.HudElementInteractionHelp.BlockInView() in VintagestoryLib\Client\Systems\Gui\Huds\HudElementInteractionHelp.cs:line 381
at Vintagestory.Client.NoObf.HudElementInteractionHelp.Every15ms(Single dt) in VintagestoryLib\Client\Systems\Gui\Huds\HudElementInteractionHelp.cs:line 342
at Vintagestory.Common.GameTickListener.OnTriggered(Int64 ellapsedMilliseconds) in VintagestoryLib\Common\Model\GameTickListener.cs:line 36
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 134
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 890
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 782
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 173
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 742
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 686
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 112
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 354
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 131
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 95

Event Log entries for Vintagestory.exe, the latest 1
==================================
{ TimeGenerated = 7/5/2026 11:45:43 AM, Site = , Source = Application Error, Message = Faulting application name: Vintagestory.exe, version: 1.22.3.0, time stamp: 0x691d0000
Faulting module name: openal32.dll, version: 1.23.0.0, time stamp: 0x63dd31ad
Exception code: 0x40000015
Fault offset: 0x00000000000df046
Faulting process id: 0xa9c
Faulting application start time: 0x1dd0c953c37da01
Faulting application path: C:\Users\John\AppData\Roaming\VSLGameVersions\1.22.3\Vintagestory.exe
Faulting module path: C:\Users\John\AppData\Roaming\VSLGameVersions\1.22.3\Lib\openal32.dll
Report Id: 2dc9624f-8753-4ee3-949f-8d6269e7d3e2
Faulting package full name:
Faulting package-relative application ID: }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions