ExterminatorX99 / MagicStorageExtra

A tModLoader mod for Terraria
MIT License
10 stars 8 forks source link

Error when placing storage components #41

Closed Egaliterrier closed 3 years ago

Egaliterrier commented 3 years ago

This is happening in both single player and multiplayer games, and with both the 64-bit and regular clients. Throws this error in the log: [01:14:55] [1/WARN] [tML]: Silently Caught Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Terraria.TileObject.CanPlace(Int32 x, Int32 y, Int32 type, Int32 style, Int32 dir, TileObject& objectData, Boolean onlyCheck, Boolean checkStay) at Terraria.WorldGen.PlaceObject(Int32 x, Int32 y, Int32 type, Boolean mute, Int32 style, Int32 alternate, Int32 random, Int32 direction) at DMD(MessageBuffer , Int32 , Int32 , Int32& ) at MagicStorageExtra.Edits.Detours.Vanilla.MessageBuffer_GetData(orig_GetData orig, MessageBuffer self, Int32 start, Int32 length, Int32& messageType) in MagicStorageExtra\Edits\Detours\Vanilla.NetMessage.cs:line 162 at DMD<DMD<Hook?11279287>?34404723::Hook?11279287>(MessageBuffer , Int32 , Int32 , Int32& ) at Terraria.NetMessage.CheckBytes(Int32 bufferIndex) at Terraria.Netplay.<>c.b__44_2() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) at System.Threading.Tasks.Task.InternalRunSynchronously(TaskScheduler scheduler, Boolean waitForCompletion) at Terraria.Netplay.OnUpdate() at DMD(Main , GameTime ) at BaseLibrary.Hooking.<>c.b__1_0(origDoUpdate orig, Main self, GameTime gameTime) in BaseLibrary\Hooking\Hooking.cs:line 21 at Terraria.Main.Update(GameTime gameTime) at Terraria.Main.DedServ() at Terraria.Program.LaunchGame() at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) at Terraria.FNALaunch.Main(String[] args)

Also seems to be connected to a read overflow for jpans too many accessories: [23:42:03] [1/WARN] [tML]: Silently Caught Exception: System.IO.IOException: Read underflow 0 of 5 bytes caused by JPANsTooManyAccessories in HandlePacket at Terraria.ModLoader.ModNet.HandleModPacket(BinaryReader reader, Int32 whoAmI, Int32 length) at DMD(MessageBuffer , Int32 , Int32 , Int32& ) at MagicStorageExtra.Edits.Detours.Vanilla.MessageBuffer_GetData(orig_GetData orig, MessageBuffer self, Int32 start, Int32 length, Int32& messageType) in MagicStorageExtra\Edits\Detours\Vanilla.NetMessage.cs:line 162 at DMD<DMD<Hook?11279287>?34404723::Hook?11279287>(MessageBuffer , Int32 , Int32 , Int32& ) at Terraria.NetMessage.CheckBytes(Int32 bufferIndex) at Terraria.Netplay.<>c.b__44_2() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) at System.Threading.Tasks.Task.InternalRunSynchronously(TaskScheduler scheduler, Boolean waitForCompletion) at Terraria.Netplay.OnUpdate() at DMD(Main , GameTime ) at BaseLibrary.Hooking.<>c.b__1_0(origDoUpdate orig, Main self, GameTime gameTime) in BaseLibrary\Hooking\Hooking.cs:line 21 at Terraria.Main.Update(GameTime gameTime) at Terraria.Main.DedServ() at Terraria.Program.LaunchGame() at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) at Terraria.FNALaunch.Main(String[] args)

ExterminatorX99 commented 3 years ago

Does this happen without jpans too many accessories? Does this happen when using the original Magic Storage?