udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

c10t segfaults on looking for player data files #233

Closed chungy closed 12 years ago

chungy commented 12 years ago

Not really sure what the culprit here is; it seems to be related to the number of players on the server somehow. I'll attach a gdb backtrace and a link to the server files that cause the issue (with the region files stripped out, they don't seem to matter).

The Minecraft server is vanilla version 1.1, and I run c10t on Arch Linux that's currently up to date.

(gdb) run -M 3072 -znw /home/chungy/minecraft/world -r 270 --show-players --ttf-path /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf --ttf-size 16 --ttf-color 255,255,0,225 -o world-20120118-1426.png
Starting program: /home/chungy/Games/minecraft/c10t/c10t -M 3072 -znw /home/chungy/minecraft/world -r 270 --show-players --ttf-path /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf --ttf-size 16 --ttf-color 255,255,0,225 -o world-20120118-1426.png
[Thread debugging using libthread_db enabled]

Generating PNG Map

 --- LOOKING FOR DATABASES --- 
players: "/home/chungy/minecraft/world/players": 
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7079724 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x00007ffff7079724 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () from /usr/lib/libstdc++.so.6
#1  0x00000000004675ed in nbt::Parser<player>::parse(boost::shared_ptr<nbt::input_buffer>) ()
#2  0x0000000000465415 in players_db::read(std::vector<player, std::allocator<player> >&) const ()
#3  0x000000000043d68c in load_players<std::vector<player, std::allocator<player> >, std::set<std::string, std::less<std::string>, std::allocator<std::string> > > ()
#4  0x0000000000442a82 in generate_map(std::ostream&, std::ostream&, settings_t&, boost::filesystem3::path&, boost::filesystem3::path&) ()
#5  0x00000000004389a7 in main ()

http://dl.dropbox.com/u/13513277/minecraft/minecraft_server_c10t_fail.tar.xz

udoprog commented 12 years ago

Would you mind publishing the data file containing the players? It might allow us to reproduce the issue.

EDIT by UniversE: removed the quote block to increase readability dramatically ;)

chungy commented 12 years ago

That's already what the tar file is.

udoprog commented 12 years ago

On Thu, Jan 19, 2012 at 9:26 AM, chungy < reply@reply.github.com

wrote:

That's already what the tar file is.


Reply to this email directly or view it on GitHub: https://github.com/udoprog/c10t/issues/233#issuecomment-3559496

Sorry, I read it on my mobile phone, didn't see the tar!

chungy commented 12 years ago

No problem. For what it's worth, a newer backup of the server files renders fine with the player database, so this issue isn't quite so serious anymore

udoprog commented 12 years ago

On Thu, Jan 19, 2012 at 11:41 PM, chungy < reply@reply.github.com

wrote:

No problem. For what it's worth, a newer backup of the server files renders fine with the player database, so this issue isn't quite so serious anymore


Reply to this email directly or view it on GitHub: https://github.com/udoprog/c10t/issues/233#issuecomment-3575771

Yeah, it looks like the player database might be corrupt, maybe the backup was taken while the server was modifying it?

chungy commented 12 years ago

I don't believe it was, but it's possible (seems likely now too, since more recent backups have successfully generated maps).