friendlyhj/ZenUtils

NullPointerException: `Cannot invoke "stanhebben.zenscript.ZenParsedFile.getFileName()" because the return value of "stanhebben.zenscript.parser.ParseException.getFile()" is null`

Closed this issue · 3 comments

Calling /ct syntax causing this error:

image

debug.log lines with error:

[15:16:10] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] §bBeginning load of the scripts
[15:16:12] [Server thread/WARN] [net.minecraft.command.CommandHandler]: Couldn't process command: ct syntax
java.lang.NullPointerException: Cannot invoke "stanhebben.zenscript.ZenParsedFile.getFileName()" because the return value of "stanhebben.zenscript.parser.ParseException.getFile()" is null
	at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:209) ~[CrTTweaker.class:?]
	at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:105) ~[CrTTweaker.class:?]
	at youyihj.zenutils.impl.runtime.ZenUtilsTweaker.loadScript(ZenUtilsTweaker.java:95) ~[ZenUtilsTweaker.class:?]
	at crafttweaker.mc1120.commands.Commands$27.executeCommand(Commands.java:868) ~[Commands$27.class:?]
	at crafttweaker.mc1120.commands.CTChatCommand.execute(CTChatCommand.java:73) ~[CTChatCommand.class:?]
	at com.feed_the_beast.ftbutilities.ranks.CommandOverride.execute(CommandOverride.java:83) ~[CommandOverride.class:?]
	at net.minecraft.command.CommandHandler.tryExecute(CommandHandler.java:119) ~[bj.class:?]
	at net.minecraft.command.CommandHandler.executeCommand(CommandHandler.java:91) ~[bj.class:?]
	at net.minecraft.network.NetHandlerPlayServer.handleSlashCommand(NetHandlerPlayServer.java:962) ~[pa.class:?]
	at net.minecraft.network.NetHandlerPlayServer.processChatMessage(NetHandlerPlayServer.java:941) ~[pa.class:?]
	at net.minecraft.network.play.client.CPacketChatMessage.processPacket(SourceFile:37) ~[la.class:?]
	at net.minecraft.network.play.client.CPacketChatMessage.processPacket(SourceFile:9) ~[la.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at net.minecraft.util.Util.runTask(SourceFile:529) ~[h.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:723) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) ~[MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:185) ~[chd.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:1817) ~[MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
[15:16:12] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] An unknown error occurred while attempting to perform this command

My file: autoportals.zs

This error doesnt happens if i would remove #reloadable.
It may be related by I removed #norun after I loaded MC.

Update: this error was fixed when I replaced all template strings with regular strings.

The latest release should fix the issue

I will try to check out later. Didnt knew its just released.

Seems like its working now!