Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange free(): invalid pointer on program exit after parsing XML. #48

Open
sgaxr opened this issue Mar 3, 2023 · 0 comments
Open

Strange free(): invalid pointer on program exit after parsing XML. #48

sgaxr opened this issue Mar 3, 2023 · 0 comments

Comments

@sgaxr
Copy link

sgaxr commented Mar 3, 2023

In my project, I'm using code to load a .tmx file (Tiled Map). Everything runs fine, but every time the program finishes running, I get free(): invalid pointer. I've finally tracked down exactly where it's happening and was able to make a minimal example, but I am stumped as to why.

require "crsfml"
require "xml"

File.write("test.xml", "<xml />") # just for the test case

XML.parse(File.read("test.xml"))

window = SF::RenderWindow.new
window.create(SF::VideoMode.new(400, 400), "Things")

window.close

If you remove the window bits, there is no error.

If you remove the XML.parse(File.read("test.xml")) line, there is no error.

Anyone know what's going on?

@sgaxr sgaxr changed the title Strange free(): invalid pointer on program exit. Strange free(): invalid pointer on program exit after parsing XML. Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant