Giter Club home page Giter Club logo

Comments (6)

Cthutu avatar Cthutu commented on September 24, 2024 1

This occurs because the code assumes you have a path before the .tmx file name - if you don't have a path separator ('/' or '') the code attempt to pop_back on an empty string.

from tmxlite.

fallahn avatar fallahn commented on September 24, 2024

Without running through a debugger myself I can't really say for sure. Can you share a map file which reproduces the problem so I can take a look?

from tmxlite.

kraxarn avatar kraxarn commented on September 24, 2024

Here's the map I used for testing. Of course, then it would be map.load("0-1.tmx"); instead.

UPDATE: Through some more testing, it seems like it crashes trying to parse the object layers for some reason...

from tmxlite.

fallahn avatar fallahn commented on September 24, 2024

parse_test
I've just run the map through the parse test program and it loads OK. Are you possibly mixing debug/release builds perhaps? And are you doing anything else to the map file or does it crash before map.load() can even return true or false? I'm running the same setup as you except on Windows 7

from tmxlite.

kraxarn avatar kraxarn commented on September 24, 2024

I've tried both debug and release builds with respective libraries and both fail with that error. map.load doesn't have time to return a value before it crashes. As I also tried including the source files directly, I doubt it's that. Although, now that I include the source files directly, I now get this runtime error instead.

from tmxlite.

fallahn avatar fallahn commented on September 24, 2024

Ah. Looking at the previous out of range exception, I'm beginning to to think this may be to do with the way strings are handled with different locale settings / whether the underlying string uses widechars or not - I've come across something similar in the logger class. I'm going to need to have a think about how to reproduce the bug my end. As a wild stab it might happen around here - you could try commenting parts out to see if it makes a difference. This is most vexing, indeed.

from tmxlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.