Repurposed Structures (Neoforge/Forge)

Repurposed Structures (Neoforge/Forge)

57M Downloads

[1.16.5] File Access Error in newest version 2.4.3

Zothen1973 opened this issue ยท 14 comments

commented

Minecraft 1.16.5 Forge 36.0.43

latest.log
debug.log

grafik

commented

I never seen that issue before. My mod is using Forge's config system so it is entirely handled by Forge itself. Have you tried deleting the config file? Have you made sure no other program has the config file opened?

commented

Hi,

no, I am setting up a new server to find problematic mods in my pack and I delete ALL configs, logs, world right before every restart.

After chkdsk /f of both partitions + reboot, I am not able to reproduce this error (so far). Will report back if anything changes.

commented

After approx. 10 retries, it happened again, same error, same file. Can't be coincedence imho. Maybe you forgot to close a file handle? 2 threads accessing the same file simultanously?

latest.log

commented

Maybe you forgot to close a file handle? 2 threads accessing the same file simultanously?

That's not how this works lol. When I said I am using Forge's system, I really meant it. All I do is tell Forge that I like to have these config files made and Forge is the one that creates, reads, and writes to the config files. All I get on my end is the values from the config files.

RSMainConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSConfigValues::new, "repurposed_structures-common.toml");
RSDungeonsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSDungeonsConfigValues::new, "repurposed_structures-dungeons.toml");
RSMineshaftsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSMineshaftsConfigValues::new, "repurposed_structures-mineshafts.toml");
RSStrongholdsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSStrongholdsConfigValues::new, "repurposed_structures-strongholds.toml");
RSWellsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSWellsConfigValues::new, "repurposed_structures-wells.toml");
RSShipwrecksConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSShipwrecksConfigValues::new, "repurposed_structures-shipwrecks.toml");
RSOutpostsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSOutpostsConfigValues::new, "repurposed_structures-outposts.toml");
RSTemplesConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSTemplesConfigValues::new, "repurposed_structures-temples.toml");
RSVillagesConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSVillagesConfigValues::new, "repurposed_structures-villages.toml");
RSMansionsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSMansionsConfigValues::new, "repurposed_structures-mansions.toml");
RSWitchHutsConfig = ConfigHelper.register(ModConfig.Type.COMMON, RSWitchHutsConfigValues::new, "repurposed_structures-witch_huts.toml");

ConfigHelper
https://github.com/TelepathicGrunt/RepurposedStructures/blob/master/src/main/java/com/telepathicgrunt/repurposedstructures/utils/ConfigHelper.java

This seems more like a bug with Forge. I can ask around if anyone seen this before

commented

Can you also try having whatever device is running the server to shut down and start back up? Maybe there a java instance that never fully closed for some reason.

commented

I can clearly see you are the expert here, not me ;) Unfortunetely, I am no modder myself, just a common c++ developer.

I restarted my server last night and I am restarting the server every time cleanly. No Java tasks remaining in Task Manager.

You have to admit it's strange, that only "repurposed_structures-common.toml" is causing an IO error, no other of your 9 configs and none of the other mods' configs.

commented

I asked in a few modding discords and no other modder seemed to have seen this before. No other users of repurposed structures have reported this either and ATM6's server they have up is working fine as well. I was also unable to reproduce this in my dev environment when I spun up a server myself.

Sorry but this issue seems to be something with how your server is setup or something. Other suggested the same that we may had missed something. But idk what. If you can figure out the issue, can you please let me know? That way I can know what to ask when another person has the same issue.

commented

After talking with curle about the cause of the forge bak file spam bug, I figured I can change my mod's default config strings from "" to " " and remove \r from my comments. this prevented Forge from creating any more bak files. try v2.4.5 of my mod and see if it fixes this issue if it is indeed caused by the bak file spam.
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures/files/3222423

commented

@Zothen1973 Have you gave forge permission to edit/create files? There's an issue where Forge seems to think my config files are incorrect and goes on to make bak files as a result. Perhaps this issue is caused by Forge lacking file permissions as it tries to make bak files? Super odd but it's all I got as a long shot as to what the issue could be. Even though the error says it is because the file is opened by another process.

Here's the issue report I have about the bak files being made for my mod's configs
MinecraftForge/MinecraftForge#7669

commented

That's cool, because I couldn't reproduce this file error after deinstalling my virus scanner completely.

I will test with your new version now and report back with any news.

Thanks for all your efforts!

EDIT:
Link above is broken though ;)

grafik

commented

Yeah cause v2.4.5 had a slight possible crashing issue so I archived it. Try v2.4.6
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures/files/3222423

commented

it's been quite a while now. Has the issue gone away for you? (Forge also fixed the .bak config bug on their end too so update forge as well)

commented

All good so far, thank you very much for your help :)

commented

Awesome! Closing now