TerraMap / windows

TerraMap Windows is an interactive Terraria v1.4 world map viewer that loads quickly and lets you pan, zoom, find blocks, ores, items in chests, dungeons, NPCs, etc.
https://terramap.github.io/windows.html
GNU General Public License v3.0
83 stars 13 forks source link

World seems to crash Terramap if new (1.4.4.2) items are in chests #41

Closed MimiaMia closed 1 year ago

MimiaMia commented 1 year ago

I am assuming that this is the cause; on the website, it loads from left to right up to where chests are contained with new items and then it goes crazy. The application won't load at all. Removing said items doesn't seem to fix it, but there might be an item somewhere I missed. It worked until today when I put some of the new items in chests, the specific items I can think of are the vulkelf ears, Jojacola, the Star Drop (junimo minion), and maybe one of the paintings.

(The only other thing worth mentioning at all is that I did mining near the bottom of the map directly where the map starts to screw up, but it doesn't line up directly.)

This is what the map looks like on the website: image image

As you can see it loads all the way up to where my chests appear (you can see the very left part of the house I built loading ok) and then it just totally breaks the map. It loads just fine in Terraria so I don't think anything is wrong with the map.

Here are my error codes when I tried to load the map on the application: (note 1: It gave two exception errors so I posted both of them here) (note 2: I removed the user folder from it manually, though it doesn't seem to reference my own C drive folder anyways)

System.IndexOutOfRangeException: Index was outside the bounds of the array. at TerraMap.Data.World.ReadTilesVersion2(BinaryReader reader, Boolean[] importance) in C:\Users\~\source\terramap\windows\Data\World.cs:line 1097 at TerraMap.Data.World.ReadWorldVersion2(BinaryReader reader) in C:\Users\~\source\terramap\windows\Data\World.cs:line 483 at TerraMap.Data.World.Read(String filename) in C:\Users\~\source\terramap\windows\Data\World.cs:line 456 at TerraMap.Data.World.<>c__DisplayClass406_0.b0() in C:\Users\~\source\terramap\windows\Data\World.cs:line 418 at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d24.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 308 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d23.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 275 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d59.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 1244 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

System.IndexOutOfRangeException: Index was outside the bounds of the array. at TerraMap.Data.World.ReadTilesVersion2(BinaryReader reader, Boolean[] importance) in C:\Users\~\source\terramap\windows\Data\World.cs:line 1097 at TerraMap.Data.World.ReadWorldVersion2(BinaryReader reader) in C:\Users\~\source\terramap\windows\Data\World.cs:line 483 at TerraMap.Data.World.Read(String filename) in C:\Users\~\source\terramap\windows\Data\World.cs:line 456 at TerraMap.Data.World.<>c__DisplayClass406_0.b0() in C:\Users\~\source\terramap\windows\Data\World.cs:line 418 at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d24.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 308 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d23.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 275 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TerraMap.MainWindow.d61.MoveNext() in C:\Users\~\source\terramap\windows\TerraMap\MainWindow.xaml.cs:line 1266 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

You might already be aware of these problems and I am sure you will be updating Terramap soon for full 1.4.4.2 support regardless; thank you for all your hard work!

MimiaMia commented 1 year ago

I did a little further testing.

When I went to a new world, I put in the new items and the map broke, however when I used the website it did not have the map tearing apart like it did previously. When I removed the items, it loaded normally.

I also had used illuminant paint (newly added in 1.4.4.2) and it also breaks the file and prevents it from loading. Again, removing the paint let it work again. In both cases the map still loaded normally on the website, but I had only used about 23 tiles of paint on the background wall and tiles (standard wooden wall and wood blocks).

I cannot confirm why the original map loaded in such a broken way. However, since I used illuminant paint, I want to mention that I specifically used it on grey stone bricks, grey stone brick walls, and grey stone brick platforms.

jasoncoon commented 1 year ago

Thank you for the detailed info! I think I have it fixed, can you try with the latest TerraMap Windows version (v1.4.15)? https://terramap.github.io/windows.html

jasoncoon commented 1 year ago

Closing, please comment if you have any more problems.