-
Notifications
You must be signed in to change notification settings - Fork 40
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
"Index out of bounds" when TMX data is missing newlines #48
Comments
@wlinna - it seems that this stems from an ambiguity in the Tiled TMX spec that doesn't specify whether newlines are meaningful. Take the assumption made by tiled-rs (which we rely on) that they are, coupled with ldtk's exporter flattening this CSV data , and you have the perfect storm for this bug. We could write in a workaround, but it seems like that effort would be better served opening a PR to tiled-rs or ldtk... |
Thanks for the info. I'll report there |
A new version of rs-tiled addressing the issue has been published. I haven't tried it with bevy_tiled yet though (cargo-lock specifies 0.9.4 anyway) |
Alright, I found an easy way to update a transitive dependency (yay): Now it works. This issue can be closed once you upgrade tiled. Again, thanks for the information – it helped me report the issue |
Hello,
bevy_tiled
crashes withIndex out of bounds
when a TMX's data (CSV) is missing new-lines. I used ldtk's TMX export to create my TMX file. Here's a small file to reproduce the issue:It works if I change
data
node to this:Here's how I use
bevy_tiled
Here's the error:
thread 'IO Task Pool (0)' panicked at 'index out of bounds: the len is 1 but the index is 1', /*/github.com-1ecc6299db9ec823/bevy_tiled_prototype-0.2.3/src/map.rs:186:46
It works if I break the lines manually or first import my TMX into Tiled editor and then save.
The text was updated successfully, but these errors were encountered: