Jadams505 / Twaila

MIT License
4 stars 1 forks source link

Crash while viewing the fullscreen map #11

Closed Jacklz closed 1 year ago

Jacklz commented 1 year ago

I encountered this error when viewing the full screen map (100% revealed). Tried to reproduce but as of yet I'm not exactly sure what caused it. But luckily I have the error saved so maybe it can be prevented.

[18:30:20.725] [Main Thread/ERROR] [Terraria]: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Twaila.Util.TileUtil.IsTileRevealedToPlayer(Player player, Tile tile, Point tilePos) in Twaila\Util\TileUtil.cs:line 115 at Twaila.Util.TileUtil.IsTileBlockedByAntiCheat(Tile tile, Point pos) in Twaila\Util\TileUtil.cs:line 86 at Twaila.Context.TileContext.CreateTileContext(TwailaPoint pos) in Twaila\Context\TileContext.cs:line 42 at Twaila.Systems.ContextEntry.Context(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 183 at Twaila.Systems.ContextSystem.ContextEntryCountAt(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 107 at Twaila.UI.TwailaUI.Update(GameTime time) in TwailaUI.cs:line 41 at Terraria.ModLoader.SystemLoader.UpdateUI(GameTime gameTime) in tModLoader\Terraria\ModLoader\SystemLoader.cs:line 212 at Terraria.Main.UpdateUIStates(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14698 at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 14274 at DMD<System.Void Terraria.Main:Update(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)

Jadams505 commented 1 year ago

Thanks for the report. Would you happen to know what mods you had enabled when you experienced the error? Or better yet provide the entire log file. I should be able to prevent this issue by writing more defensive code, but I need to be able to reproduce the error to know for sure.

Jacklz commented 1 year ago

sure. Also, the crash seems to happen when mousing outside the fullscreen map when it is open. i cant reproduce it 100% of the time though, maybe its after a mod reload? I experience this in multiplayer client.log

Jadams505 commented 1 year ago

Unfortunately I am still unable to reproduce this issue. I have pushed an update v0.4.0.3 that should hopefully stop the error from occurring. Please let me know if you still encounter this issue.

Jacklz commented 1 year ago

I'll do some more testing today and will report back if its fixed or not

Jacklz commented 1 year ago

After some testing, I was not able to encounter the crash again! If I encounter any other problems ill make a new issue post

Jadams505 commented 1 year ago

Awesome! Thanks for your help.

TrueHitoare commented 1 year ago

Afraid this issue is still occurring for me. Log attached. client.log

Crash is caused by zooming the map out all the way, then dragging the mouse around areas outside the map, possibly while also using WASD to pan the map.

Only happens on one of my worlds, with one of my characters specifically, and doesn't happen if no other mods are installed, but stops when I remove TWAILA. I don't know what could possibly be requiring that specific set of circumstances. If necessary, I can upload both the world and the character if, uh, you give me a suggestion how? <.< GitHub only accepts certain file types.

[04:49:52.761] [Main Thread/WARN] [tML]: Silently Caught Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Terraria.GameContent.Drawing.TileDrawing.IsTileDangerous(Int32 tileX, Int32 tileY, Player player) in tModLoader\Terraria\GameContent\Drawing\TileDrawing.TML.cs:line 16 at Twaila.Util.TileUtil.IsTileRevealedToPlayer(Player player, Tile tile, Point tilePos) in Twaila\Util\TileUtil.cs:line 125 at Twaila.Util.TileUtil.IsTileBlockedByAntiCheat(Tile tile, Point pos) in Twaila\Util\TileUtil.cs:line 86 at Twaila.Context.TileContext.CreateTileContext(TwailaPoint pos) in Twaila\Context\TileContext.cs:line 45 at Twaila.Systems.ContextEntry.Context(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 222 at Twaila.Systems.ContextSystem.ContextEntryCountAt(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 133 at Twaila.UI.TwailaUI.Update(GameTime time) in TwailaUI.cs:line 43 at Terraria.ModLoader.SystemLoader.UpdateUI(GameTime gameTime) in tModLoader\Terraria\ModLoader\SystemLoader.cs:line 212 at Terraria.Main.UpdateUIStates(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14725 at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 14311 at Terraria.Main.Update(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14091 at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 546 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 at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 240 at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in tModLoader\Terraria\Program.cs:line 213 at Terraria.MonoLaunch.Main_End(String[] args) in tModLoader\Terraria\MonoLaunch.cs:line 78 at Terraria.MonoLaunch.<>c__DisplayClass1_0.

b__1() in tModLoader\Terraria\MonoLaunch.cs:line 64 at System.Threading.Thread.StartCallback()

[04:49:52.764] [Main Thread/ERROR] [Terraria]: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Terraria.GameContent.Drawing.TileDrawing.IsTileDangerous(Int32 tileX, Int32 tileY, Player player) in tModLoader\Terraria\GameContent\Drawing\TileDrawing.TML.cs:line 16 at Twaila.Util.TileUtil.IsTileRevealedToPlayer(Player player, Tile tile, Point tilePos) in Twaila\Util\TileUtil.cs:line 125 at Twaila.Util.TileUtil.IsTileBlockedByAntiCheat(Tile tile, Point pos) in Twaila\Util\TileUtil.cs:line 86 at Twaila.Context.TileContext.CreateTileContext(TwailaPoint pos) in Twaila\Context\TileContext.cs:line 45 at Twaila.Systems.ContextEntry.Context(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 222 at Twaila.Systems.ContextSystem.ContextEntryCountAt(TwailaPoint pos) in Twaila\Systems\ContextSystem.cs:line 133 at Twaila.UI.TwailaUI.Update(GameTime time) in TwailaUI.cs:line 43 at Terraria.ModLoader.SystemLoader.UpdateUI(GameTime gameTime) in tModLoader\Terraria\ModLoader\SystemLoader.cs:line 212 at Terraria.Main.UpdateUIStates(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14735 at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 14311 at Terraria.Main.Update(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14091

Jadams505 commented 1 year ago

Thanks for the report. If you could send the player and world file that would be great. The easiest way to do this would most likely create a .zip of those files. Players are located in: \Documents\My Games\Terraria\tModLoader\Players Please include:

Worlds are located in: \Documents\My Games\Terraria\tModLoader\Worlds Please include:

TrueHitoare commented 1 year ago

Oh, didn't notice .zip was an accepted file type, that should've been obvious. XP;; Attached. TWAILA-Crash.zip

Also included the .txt and .json from the ModPack I'm using (minus TWAILA), in case that makes it easier to get the right mods, plus my ModConfigs. If there's anything else you can think of that might help, let me know.

Jadams505 commented 1 year ago

Thanks for your help! I just pushed update v0.5.0.3 which should finally fix this issue. Please let me know if you have anymore issues.

TrueHitoare commented 1 year ago

Been working great so far. Thanks for the quick fix!