Color file lookup segmentation fault
T1MOXA opened this issue ยท 9 comments
root@ubuntu: ~/mcmap ./mcmap ~/level
mcmap 3.0.0, compatible with Minecraft since v13, 64bit
Segmentation fault (core dumped)
build log:
root@ubuntu:~/mcmap# make
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp main.cpp -o main.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp helper.cpp -o helper.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp colors.cpp -o colors.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp worldloader.cpp -o worldloader.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp draw_png.cpp -o draw_png.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp settings.cpp -o settings.default.o
g++ -O3 -std=c++17 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -D_FILE_OFF SET_BITS=64 -fopenmp canvas.cpp -o canvas.default.o
g++ main.default.o helper.default.o colors.default.o worldloader.default.o draw_ png.default.o settings.default.o canvas.default.o -lz -lpng -fopenmp -o mcmap
Yeah the world discovery support is flimsy, as it is kinda pricey to accurately evaluate the chunks without loading everything twice. Would you mind sharing the level and your minecraft version ?
IDK version of this world, not too old, and not too new.
1.12 - 1.14
This is save from local server.
Where I can upload it ?
I can try to create new world in Minecraft 1.14 and test with it...
Does it make sense ?
You can upload it right here in github.
The minecraft internals changed quite a bit in 1.13, so support for worlds prior to that version has been dropped. Just loading the world in 1.14 will convert the loaded sections, but not the whole world: you'll have to use -from -to
to select what to render.
The latest commit should fix segfaults when opening older savefiles, and will render only compatible chunks. Please let me know if that fixes your issue.
@T1MOXA Does the thumbs up mean that I can close the issue ?
I was able to open the same map, but only from a directory with a binary file.
When calling from the /root directory, I got the same error.
For example
~# ./mcmap/mcmap /root/shared/44/level -from -5000 -5000 -to 5000 5000
= Segfault
But
~/mcmap# ./mcmap /root/shared/44/level -from -5000 -5000 -to 5000 5000
works fine
Okay this is something I thought I had done but apparently not: the program needs to load colors from a json
file for now, until I am fixed on the colors and can embed them in the executable. This is done by passing a path using the -colors
option. If the option is not given, it will try and load ./colors.json
.
The latest commit has an error message, and I'll work on a clean looking logger sometime soon.
Thanks.
OpenLayers example didn't work too because of removed (reworked ?) -split option
Temporarily removed*
The code got 99% rewritten from the last version, and I haven't had time to re-implement everything. This is on the backburner for now.