Closed uncovery closed 3 years ago
Did you compile it with our gradle tasks?
Because besides compiling the code, there is also a task that downloads and regenerates the colormaps from the minecraft files.
Yes, if you want to run it yourself see https://github.com/Minecraft-Technik-Wiki/BlockMap#run-it . Essentially, you should run ./gradlew regenerate
and then it should work.
For reproduction, it'd be cool if you found a small example world that fails. But more importantly, please post the commands you are running that give you this result. Together with the stack trace, this should hopefully be enough for me to figure out what's going wrong.
The command I am using is this:
/etc/alternatives/jre_16/bin/java -jar /folder/BlockMap-cli-2.2.1.jar render -f /folder/kingdom --create-big-image --min-X=-3264 --max-X=3264 --min-Z=-3264 --max-Z=3264 -o /folder/png --create-tile-html
regenerate works. but then when I do the next one it fails.
gradlew :BlockMap-cli:run
> Configure project :BlockMap-gui
Project :BlockMap-gui => no module-info.java found
> Configure project :BlockMap-internal
Project :BlockMap-internal => no module-info.java found
> Task :BlockMap-cli:run FAILED
Missing required subcommand
Usage: blockmap [-hvV] COMMAND
-h, --help Print this help message and exit
-v, --verbose Be chatty
-V, --version Print version information and exit.
Commands:
render Render a folder containing region files to another folder
through the command line interface
render-many Render multiple worlds using a configuration file for usage in
servers
This is the command line interface of blockmap. To access the GUI (if
installed), run `blockmap-gui`.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':BlockMap-cli:run'.
> Process 'command 'C:\Program Files\Java\jdk-11\bin\java.exe'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
6 actionable tasks: 4 executed, 2 up-to-date
That already looks promising. You can now pass command line arguments to the application. Doing so through Gradle is a bit unweildy because of potential escaping issues: ./gradlew :BlockMap-cli:run --args="render -f /folder/kingdom --create-big-image --min-X=-3264 --max-X=3264 --min-Z=-3264 --max-Z=3264 -o /folder/png --create-tile-html"
Regarding the issue, there should be a rendered.json.gz
file in your output folder. It seems to be broken, please send me its content. You may also try deleting it and see if it helps.
There is no rendered.json.gz in the folders anywhere. I can't find any .gz files and no file called rendered.*
I cannot run the command since I have only managed to coax my local windows machine to run Java 12 to make the compiling possible, my CentOS production machine where the world is located does not have Java 12 and all the commands fail with either Java 11 or 16 and I cannot figure out how to install java 12 on the production machine only for the gradle commands without setting it as a default for everything and screwing with too many other things in return.
Things are starting to get really weird. The application should create a /folder/png
output folder and a rendered.json.gz
in it. If you already run the command previously, the one already existing should be used instead.
Please try running in a clean output directory, just to make sure no corrupt files are causing this. After that /folder/png/rendered.json.gz
should definitely exist as the error happens later, and the unzipped content should be {regions:[]}
.
Ah ok, I thought that .gz is a part of the compile output, not the run. I'll check that and get back to you.
ok so., problem solved....
under java 16, the rendered.json.gz from the initial error report was empty. I deleted it, and everything went fine.
What I finally suggest is to change the related function like this to tell what is wrong
/**
* Loads a json file that contains the information about all rendered files.
*
* @see #parseSaved(JsonElement)
*/
protected SavedRegionFolder(T file) throws IOException {
this.basePath = file;
SavedRegionHelper helper = load(file);
if (helper == null) {
throw new IllegalArgumentException("invalid file " + file.toString() + ", please remove");
}
pins = Optional.ofNullable(helper.pins);
regions = Optional.ofNullable(helper.regions)
.stream().flatMap(Collection::stream)
.collect(Collectors.toMap(r -> new Vector2i(r.x, r.z), Function.identity()));
timestamp = helper.timestamp;
isNether = helper.isNether;
}
This then points the user to the defect file and the problem is solved.
Yes, thank you. To be honest, I'm astonished that an empty file serializes to null
instead of throwing a DeserializationException
for invalid JSON.
Environment info
2.2.1
"16.0.1" 2021-04-20
CENTOS Linux aimba 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Description
On one among several worlds, I am getting the following error:
Steps to reproduce
I cannot instruct how to reproduce without uploading the whole world somewhere. Is there a chance to make a test for "helper" being null in the code and outputting which file is making trouble?
I tried to compile it myself but my Java skills are close to zero so I could not get it done. Compiling works but running throws this here: