Steveplays28 / biomefog

Minecraft Fabric mod that adds unique fog to a bunch of biomes!
https://www.curseforge.com/minecraft/mc-mods/biome-fog
Other
1 stars 4 forks source link

Crash on MacOS due to `.minecraft/config/` not being found #17

Closed Aces-and-Jacks closed 1 year ago

Aces-and-Jacks commented 1 year ago

https://mclo.gs/ncNKAD4

1.19.2

1.1.0+mc1.19-1.19.2

Aces-and-Jacks commented 1 year ago

Crash with less mods

https://mclo.gs/VGNNlKc

Steveplays28 commented 1 year ago

Seems like something went wrong while creating the config. I thought I fixed all issues like these because I've had similar crashes while testing.

I'll do some further investigating, thanks for the report Aces and Jacks!

Steveplays28 commented 1 year ago

I can't reproduce this on 1.19.2, with Biome Fog v1.1.0+mc1.19-1.19.2. I tried to mess with the world blacklist commands in various ways, also tried deleting the world blacklist config file and then using the commands, but in all cases the world blacklist config file got regenerated properly.

Could you give some more details on how this crash occurred?

Aces-and-Jacks commented 1 year ago

Well when minecraft loads up it occurs when I join a single-player world. I'm on macOS, using Prism launcher if that helps. The previous version works tho so I don't think it's either. I'm also using quilt. I'll try fiddling with it

Steveplays28 commented 1 year ago

Alright, I'm using Quilt with Prism Launcher as well to test at the moment.

Only issue I could find just now is that the config folder doesn't get regenerated if you delete it and run one of the world blacklist commands, though this doesn't crash the game for me. The config folder gets recreated on next game launch though, and it keeps using the default config until you relaunch the game or reload, not causing a crash in that case either.

Aces-and-Jacks commented 1 year ago

tested with fabric and same issue https://mclo.gs/tgfiiqA

No idea why config doesn't generate

Aces-and-Jacks commented 1 year ago

Yeah so I tested it with just fabric api, sodium, and biome fog. Version 1.0.1 loads the config file but 1.1.0 doesn't. Is there a way to turn on a debug mode to see what the mod does that would be able to help?

bare bones with new version of mod: https://mclo.gs/6udq70l bare bones with old version of mod: https://mclo.gs/rpY59UA sorry if the log spamming is annoying just figured that without the other mod fluff would help

Steveplays28 commented 1 year ago

No worries, it's helpful to debug the issue, I appreciate the time you put into these issues.

This is a bit of a long shot and shouldn't happen, but could you check if by chance the config folder got generated at the root of your drive (/config/biome_fog/)? At the moment there isn't a debug mode.

Aces-and-Jacks commented 1 year ago

maybe this?

New version:

Unable to load Biome Fog configuration files at config/biome_fog. Loading default configuration. See stack trace below:
--
  | [20:42:16] [Render thread/INFO]: [STDERR]: java.nio.file.NoSuchFileException: config/biome_fog/biome_fog.json

Old version: Created Biome Fog configuration file, located at ./config/biome_fog.json

Maybe it's the file path name config/biome_fog/biome_fog.json vs ./config/biome_fog.json

Aces-and-Jacks commented 1 year ago

This is a bit of a long shot and shouldn't happen, but could you check if by chance the config folder got generated at the root of your drive (/config/biome_fog/)?

Root of my drive. Like in the minecraft folder or somewhere else. Where would that be?

Steveplays28 commented 1 year ago

Root of my drive. Like in the minecraft folder or somewhere else. Where would that be?

Quite literally just in C:/config/biome_fog basically, where C: can be replaced with whatever MacOS uses for their disk drive names. I've had this happen once while testing, but I doubt this happened.

Aces-and-Jacks commented 1 year ago

ohh, well I looked for anything with the name "biome_fog" but didn't find anything. Other than the files already present in the minecraft folder

Steveplays28 commented 1 year ago

maybe this?

Yeah that seems like the issue. The worst case scenario is triggered here, it's saying .minecraft/config/ doesn't exist, which in theory should never happen because modloaders make these lmao I suppose my directory checking isn't quite right.

I'll try to compile a fix for you, give me a minute

Aces-and-Jacks commented 1 year ago

Well I'm glad the issue was found. Thank you

Steveplays28 commented 1 year ago

No problem. Could you try the build of this new branch?

Files should appear under artifacts once it's done compiling: https://github.com/Steveplays28/biome-fog/actions/runs/5570789160

Aces-and-Jacks commented 1 year ago

The file without the sources in it right?

Aces-and-Jacks commented 1 year ago

not biome-fog-1.1.0+mc1.19-1.19.2-sources but biome-fog-1.1.0+mc1.19-1.19.2 right?

Steveplays28 commented 1 year ago

Yeah, the file without sources.

Aces-and-Jacks commented 1 year ago

https://mclo.gs/Ko0s5yL

Aces-and-Jacks commented 1 year ago

new error. but same issue probably

Steveplays28 commented 1 year ago

Huh, odd. Are the config files actually there? If so, could you send the contents of them?

Aces-and-Jacks commented 1 year ago

no files got generated

Steveplays28 commented 1 year ago

Ah, after reading the log a bit more closely it seems that your .minecraft/config/ folder is read-only.

[21:19:18] [Render thread/INFO]: [STDERR]: java.nio.file.FileSystemException: /config: Read-only file system

Aces-and-Jacks commented 1 year ago

the only files are sodium-mixins, modmenu, and sodium-options

Steveplays28 commented 1 year ago

Could you inspect the properties of the folder and see if it's set to read-only? If it is, try unchecking that and relaunching the game.

Aces-and-Jacks commented 1 year ago

Ah, after reading the log a bit more closely it seems that your .minecraft/config/ folder is read-only.

[21:19:18] [Render thread/INFO]: [STDERR]: java.nio.file.FileSystemException: /config: Read-only file system

Well probably but every other mod has worked before. Even the old biome fog version worked. I mean I know what read only means but it hasn't been an issue in the past

Aces-and-Jacks commented 1 year ago

Both folders are set to read and write for the user login I'm on. config and .minecraft

Steveplays28 commented 1 year ago

Yeah it's odd for sure. Let me try some more things and I'll get back to you in a bit

Steveplays28 commented 1 year ago

Compiling a new build, let me know if it works: https://github.com/Steveplays28/biome-fog/actions/runs/5570874678

Aces-and-Jacks commented 1 year ago

https://mclo.gs/ucqzl7u the world loaded. and the config file

Steveplays28 commented 1 year ago

Ayy there we go! I'll release this as a hotfix sometime later.

Aces-and-Jacks commented 1 year ago

Was it an odd fix or just something that got missed?

Steveplays28 commented 1 year ago

Something I missed really. It tried to create the config folder on your drive root instead of in the instance folder alongside all other mods' config files, like it's supposed to. I assumed the old way would work since it worked for me on Windows, but seems like it breaks on MacOS, wouldn't surprise me if it breaks on Linux as well.

I now get the actual config folder path via a helper method from the Fabric Loader API, seems to work on Quilt as well which is nice.

Aces-and-Jacks commented 1 year ago

hm, well thanks for solving it. Glad I could help with testing. and figured since this got fixed I could close it

Steveplays28 commented 1 year ago

No problem, have fun! I'll update the issue once the fix has been released.

Aces-and-Jacks commented 1 year ago

Is it fine closed or should I leave open till release?

Steveplays28 commented 1 year ago

Might actually be nice to keep open until release yeah, fair point. Minimizes the risk of duplicate issues. I'll close it again once it's released.

Steveplays28 commented 1 year ago

This fix has been released in v1.1.1!

Aces-and-Jacks commented 1 year ago

The game version tag for the 1.19.2 version shows for 1.19-1.19.4 which would confuse launchers

Steveplays28 commented 1 year ago

You're too quick haha, just fixed that. Thanks for pointing it out. I need to fix the underlying issue (with the MC Publish action) sometime.

Aces-and-Jacks commented 1 year ago

No problemo. You just happened to close it when I'm on my computer. Thanks for fixing