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

Assertion error: "Assertion `type >= 0 && type <= TAG_Compound' failed." #2

Closed
yesrod opened this issue Sep 14, 2010 · 8 comments
Closed

Comments

@yesrod
Copy link

yesrod commented Sep 14, 2010

Latest head, checked out and compiled on Ubuntu 10.04 x86_64 on a quad-core Opteron machine. Build process completes fine, but whenever I try to generate, I get the following error:

root@leftovers:/opt/minecraft-smp/maps# ./c10t -w /opt/minecraft-smp/world.1 -o /var/www/minecraft-map.png
type '-h' for help

world: /opt/minecraft-smp/world.1
output: /var/www/minecraft-map.png

Reading and projecting blocks on 1 thread(s)...
c10t: /opt/c10t/c10t/src/nbt/nbt.h:304: nbt::Byte nbt::Parser::read_tagType(void*): Assertion `type >= 0 && type <= TAG_Compound' failed.
Aborted

@reportingsjr
Copy link
Contributor

Can you attach/upload the /opt/minecraft-smp/world.1/ folder somewhere? It sounds like an issue with your map data files.

Just an fyi, when you do run this it would run much, MUCH faster if you also used the option -m 4. (Uses all four cores of your processor rather than just one!)

@udoprog
Copy link
Owner

udoprog commented Sep 14, 2010

This would indeed indicate that either:

  1. One of your map data files are grammatically incorrect according to NBT
  2. The parser is broken.

Either way I would appreciate it if you could upload the world somewhere public so that we can have a look.

P.S. The parsing process should report which file botches things up, to simplify these sort of things in the future, will create another issue revolving around that.

@udoprog
Copy link
Owner

udoprog commented Sep 14, 2010

A debug mode has been added to the program (albeit hastily), and error tracing has been added to the parser, try running the using the --debug parameter.

@yesrod
Copy link
Author

yesrod commented Sep 14, 2010

I was getting a different assertion error before (sorry, didn't think to save it as single threaded worked) with the threaded mode, as well as the output rendered caves on top of everything else (single threaded was fine). It looks like my map is partially corrupt, though. I get this with the new output:
Parser Error: ../world.1/l/l/img.l.l.nocave.0c6c4e.png at (uncompressed) byte 1 - Not a valid tag type
You can find the world at http://adamdorsey.net/world.1.tar.gz shortly (I have to tar it up and upload it).

@udoprog
Copy link
Owner

udoprog commented Sep 14, 2010

iinteresting, you seem to be having a .png file in your world folder, specifically ../world.1/l/l/img.l.l.nocave.0c6c4e.png
Remove it and try again

This also makes me think that c10t should ignore non-parsable files.

@yesrod
Copy link
Author

yesrod commented Sep 14, 2010

I think those PNG files are from a different mapper I also use that provides a Google Maps interface (I use both for things that don't support the Google Maps as well). They are its cache and having c10t ignore them would be a lot better than killing the cache each go (that mapper takes 30+ minutes from scratch sometimes). Therefore I strongly vouch for the ignoring of non-parseable files :) For test purposes, I went ahead and deleted the png files and it worked perfectly.

@udoprog
Copy link
Owner

udoprog commented Sep 14, 2010

Okey, HEAD now as of rev 4d1c8a7 ignores unparseable files unless --require-all is specified.

Marking this as closed, thanks for the help!

@yesrod
Copy link
Author

yesrod commented Sep 14, 2010

Confirming it works, thanks :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants