spoutn1k/mcmap

Segmentation Fault on Mac OS X when specifying -from and -to

devyn opened this issue · 2 comments

DevBook >> ./mcmap -skylight -from -1 -1 -to 1 1 -file ~/Desktop/Main\ World\ Ch.png ~/Library/Application\ Support/minecraft/saves/Main\ World
mcmap 2.0a
McRegion world format detected.
Image dimensions are 202x362, 32bpp, 0.28MiB
Terrain takes up 0.78MiB, lightmap 0.39MiB
Loading all chunks..
[0.00%]
[100.00%]
Optimizing terrain...
[0.00%]
[100.00%]
Drawing map...
[0.00%]
[100.00%]
Writing to file...
[0.00%]
zsh: segmentation fault  ./mcmap -skylight -from -1 -1 -to 1 1 -file ~/Desktop/Main\ World\ Ch.png 

Hmm, maybe it's just that range is too small. If I do -from -10 -10 -to 10 10 it works.

Zahl commented

There was actually a bug with using from/to. I was sure I pushed a fix for this the other day, but I can't see it in the github commit history. However looking at the source of worldloader.cpp at github there are the "< 0" checks in calcBitmapOverdraw() that fixed it.
Do you have them in your local copy?
Anyways, since I'm reverting parts of the overdraw/cropping stuff, it should be fixed for sure in the next version.