TheBoneJarmer / TiledCS

TiledCS is a dotnet library for loading Tiled tilesets and maps
MIT License
139 stars 51 forks source link

v3.3.0 unable to load map files? #87

Closed Frankfires closed 2 years ago

Frankfires commented 2 years ago

I'm straight up confused. Things were working fine right before I updated, if I downgrade back to v3.2.3 things work fine again. image

TheBoneJarmer commented 2 years ago

That is definitely not good. Could you send the whole stacktrace please?

Frankfires commented 2 years ago

here ya go 👍

TiledCS.TiledException
  HResult=0x80131500
  Message=An error occurred while trying to parse the Tiled map file
  Source=TiledCS
  StackTrace:
   at TiledCS.TiledMap.ParseXml(String xml)
   at Static.Utilities.InGame.Initialize() in C:\Users\me\Desktop\Static\Game\Static\Static\Utilities\Menu.cs:line 49
   at Static.Utilities.Menu..ctor() in C:\Users\me\Desktop\Static\Game\Static\Static\Utilities\Menu.cs:line 19
   at Static.Utilities.InGame..ctor()
   at Static.Static.Initialize() in C:\Users\me\Desktop\Static\Game\Static\Static\Static.cs:line 48
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Static.Program.Main() in C:\Users\me\Desktop\Static\Game\Static\Static\Program.cs:line 11

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
NullReferenceException: Object reference not set to an instance of an object.
TheBoneJarmer commented 2 years ago

Thanks! Does the inner exception have a stacktrace by any chance? Because unfortunately this says fuck to me haha

pacoo2454 commented 2 years ago

I am getting the same error when I have an object layer in the tilemap.

TheBoneJarmer commented 2 years ago

Hey @pacoo2454

Thanks for the heads up about the object layer. I didn't had one in my test map anymore so I just added one and it went kaboom for me too. So I patched it up and a new version should be on its way in a couple of minutes. :)

EDIT: That said, aside of the nullref exception I got with an object layer, everything else works fine for me. So if anyone still encounters an error, please provide me with as much info you can give. Like the full exception or a tmx file if possible.

With kind regards, TheBoneJarmer

Frankfires commented 2 years ago

I've updated to 3.3.1 things seem to be working flawlessly ( so far ) 👍

pacoo2454 commented 2 years ago

No problem. That also fixed it for me too! Thanks for the quick update.

TheBoneJarmer commented 2 years ago

Awesome! Glad it works for the both of you. :D