Special AI

Special AI

6M Downloads

Cannot remove block from "idle_ai.toml" break list on a headless server

belathus opened this issue ยท 13 comments

commented

Yesterday, I made this commit for a modpack I'm working on: belathus/Wanderlust@3ef6736

Unfortunately, when I tried to test this, my server started crashing: https://gist.github.com/belathus/d902c776c9d176a8a6df0ebfa56e949d

I don't think I made a mistake when editing the config, as it seems to work fine in single-player (this isn't causing a crash in single-player). It is only crashing on a headless server.

commented

Have you tried to replicate this problem with only SpecialAI loaded and no other mods present? From what I have seen in the log you posted, the error seems to be entirely related to SpecialAI, but if possible it would be very helpful if you try to replicate the crash with only this mod installed.

commented

So you only experience this crash on your dedicated server? It is the server that is crashing, not your client?

commented

That is correct. The crash only happens when a dedicated server is starting.

commented

I'm failing to duplicate the crash with only a handful of mods installed. I've even tried re-adding mods like Quark (which requires AutoRegLib) and Futurepack just so I had something to remove from the idle_ai config file.

Another thing to note is that SpecialAI does not crash if I do not modify the default config file.

commented

I see. Could you provide a copy of what your config looked like when the crash occurred?

commented

The file in the commit is what I uploaded. I'll take a look to see if it gets modified after the server starts.

commented

I would be interested to see the final file after the crash, since the file can be modified during runtime by the mod. Also, could you send the console output/log leading up to the crash? SAI might print something useful right before the crash happens, if we're lucky.

commented

Well, this is bothersome, but I'm no longer able to repeat the crash, even with all of the mods installed and the same exact config file (the only change that appears to have been made is to the comment that lists the default blocks, which changed the order of the list; I used "diff" to check the differences).

I reported this because I got the crash repeatedly after modifying the configs. Each time, I deleted the original config and tried modifying it again and got the same crash. It happened at least 5 separate times, but now I can't repeat it. I've made no updates, I just reverted the config file then re-uploaded it hours later so I could see if it changed the file during runtime. So color me confused.

commented

https://gist.github.com/belathus/6694efc08029e43ce9ffcd399df4003c

Here is a log file of the crash, though, from early this morning.

commented

Hm I see, perhaps this is a strange issue with the read/write. Not sure why or how it would happen, though. If it does happen again, try to start the server again without touching the config file - it may resolve itself that way if this is the case.

commented

I got the crash to happen again. https://gist.github.com/belathus/466ad5cc7680ca062c2f9ebe42729361

Here is the config file after the crash: https://gist.github.com/belathus/9a74c73e8e3132bdfc57cf25e71853f2

Letting it restart after a crash just causes it to crash again.

commented

Looks like this is specifically the cause: https://gist.github.com/belathus/9a74c73e8e3132bdfc57cf25e71853f2#file-gistfile1-txt-L218
I don't know what causes it to malform the config, however. I suspect this might be an issue with NightConfig, but it might just be a problem with my implementation - I'll keep this open to remind me to look into it.

commented

Fixed