mojira.dev
MC-103399

/debug command create empty files

running the /debug command with

/debug start
/debug stop

creates a new file but with no content.


Code analysis by @unknown can be found in this comment.

Attachments

Comments 6

There were no issues to log, so there is nothing in the log file. The file is created to indicate that the session was indeed logged.

What issues would there need to be in order for something to exist within the file? Even when getting warnings in the game output tab ("Something's taking too long! 'root' took aprox 120.008753 ms"), which only occur when debugging is turned on, the file created is empty. Having a non-perfect tickrate also doesn't prompt any content.

Hmm, I suppose you're right. It seems there should be a witty comment in the file, at the very least.

Confirmed for 1.10 and 1.10.2. These files should always have content, even if the profiling lasts a mere second with no problems to report.

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason is very likely that the method net.minecraft.command.CommandDebug.saveProfilerResults(long, int, MinecraftServer) is not closing the FileWriter.

George Stichel

Erik Broes

Community Consensus

Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w36a, ..., Minecraft 16w40a, Minecraft 16w41a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 16w44a

Minecraft 1.11 Pre-Release 1

Retrieved