Better Foliage

Better Foliage

35M Downloads

1.10.2 Crash on fresh startup - file not found betterfoliage.log?!

NitroxydeX opened this issue ยท 5 comments

commented

I think this is kinda the worst error that could ever happen but why is there no check if the file is REALLY there?

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Better Foliage (BetterFoliage)
Caused by: java.io.FileNotFoundException: logs\betterfoliage.log
commented

I think this is a fail at Forges side. The "logs" folder isn't there from the beginning. When BF now tries to create the file it fails. Noticed this behaviour on Forges server install. it failed because it could not create the modlist json inside the "mods" folder because Forge didn't created one at this state. A check for the folder would be necessary.

commented

That could explain why I've never seen this - I only ever test BF in client mode, since there's no point to including it on the server.

In that case, my change will do nothing, as File.createNewFile() does not create missing parent directories.

commented

well. The BF error happend on client side. I just noticed that forge doesn't care for directories too.

commented

That's bad news. I'll put a better failsafe in, to be released with the next version.

Until then, the obvious workaround would be to create the directory by hand before launch.

commented

The file is created automatically by the logger. I've added some code to force-create it just in case, but since this problem never came up before, I suspect it's something special in your setup that causes it, and the "fix" might do nothing.

My only idea would be to check if the user you're starting Minecraft with actually has permission to write/create files in the logs directory.