tModLoader

tModLoader

Terraria Ambience
Issue when toggleling off the mod (not the API)
Hi ! I would like to help you or at least knowing if the issue already exists. In some words, when the mod is enabled it cause :
- Crash when i try to disable it then (see log bellow)

I should have to disable it unfortunatly but, i tried it anyway and frankly good job !

Here is the crash log :
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Xna.Framework.Audio.SoundEffect.Dispose() in D:\a\tModLoader\tModLoader\FNA\src\Audio\SoundEffect.cs:line 314
at ReLogic.Content.Asset`1.Dispose(Boolean disposing) in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\Asset.cs:line 101
at ReLogic.Content.AssetRepository.Dispose(Boolean disposing) in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\AssetRepository.cs:line 391
at ReLogic.Content.AssetRepository.<>c__DisplayClass6_0.<Invoke>b__0() in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\AssetRepository.cs:line 80
at ReLogic.Content.AssetRepository.TransferCompletedAssets() in D:\a\tModLoader\tModLoader\src\tModLoader\ReLogic\Content\AssetRepository.cs:line 190
at Terraria.ModLoader.ModContent.DoTransferCompletedAssets() in tModLoader\Terraria\ModLoader\ModContent.cs:line 623
at System.Threading.SpinWait.SpinUntil(Func`1 condition, Int32 millisecondsTimeout)
at Terraria.ModLoader.ModContent.TransferCompletedAssets() in tModLoader\Terraria\ModLoader\ModContent.cs:line 615
at Terraria.Main.Draw_Inner(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 52919
at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 52900
at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 562
at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878
at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419
at Terraria.Program.RunGame() in tModLoader\Terraria\Program.cs:line 266
[10:45:28.212] [Main Thread/DEBUG] [TerrariaSteamClient]: Send: shutdown

I tried with many possibilities but it seems the mod do not require any other mod to crash.
Here is the list of enabled mods
[
"TerrariaAmbienceAPI",
]
Last edited by Shiozen_Gekkou; 1 Apr, 2024 @ 2:08am