Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

[0.20.2] "FactionDataBase failed to load file for AI faction 0"


MRT
 Share

Recommended Posts

  • Boxelware Team

You enabled tracing, which bloats the server log immensely, and which should only be enabled while reproducing a specific error, not in normal production.

 

All those lines are perfectly normal behavior, and not errors , but I'll go into more depth:

Attempting to invoke 'exists' in '""'
Call to 'exists' in '""' successful.

This is perfectly normal behavior if you enable tracing for scripts, because it will print every single invocation of a lua VM that the game does. And there are lots and lots of them. What the game does here is invoke a function in a virtual script (hence the "" which only means it has no filename) which is created to interface with existing scripts.

 

FactionDataBase failed to load file for AI faction 0

Perfectly normal behavior as well, because Faction Index 0 is reserved for "Belongs to no faction". So the game can't load a file for faction 0 because it doesn't exist. It's debatable if it's necessary to print an error trace here, but we decided that more information is better than less.

 

I need you to post a log from a session where the server actually crashed (tracing enabled helps a lot of course) to find out why it crashed. Also: Does it crash or is it hanging with the server process still running?

Link to comment
Share on other sites

  • Boxelware Team

The log you posted can't be from a session where it deadlocked, there are lines indicating the server shut down successfully. So no infinite loop. Just because a line is repeated in a trace log doesn't mean it's just meaningless looping.

 

I also can't find any indication for a real hang in the log because the server shows lots of different output, especially for scripts.

My best guess is that there is a big performance issue on this server.

 

Please post the logs from a session where it hanged or tell me in which line (or time) it hanged.

Link to comment
Share on other sites

  • Boxelware Team

2019-01-03 06-57-03| error constructing ivec3: not enough arguments, expected a value of type 'int' at stack position 3 at 
2019-01-03 06-57-03| stack traceback:
2019-01-03 06-57-03|     [C]:-1: in function ivec3
2019-01-03 06-57-03|     data/scripts/entity/ai/dock.lua:87: in function flyToDock
2019-01-03 06-57-03|     data/scripts/entity/ai/trade.lua:81: in function updateServerAI
2019-01-03 06-57-03|     data/scripts/entity/merchants/tradeship.lua:63: in function ?

This is definitely an error, but not one that can even remotely cause hangs of this magnitude. I resolved this one and could still reproduce the hang thanks to your save. I'm looking more into it.

 

Edit: Found the issue! Hooray! Will be fixed in the next update.

Link to comment
Share on other sites

  • Boxelware Team

The issue is a deadlock in a reworked callback system we introduced for map command feedback. Whenever some stats of ships change, a callback is sent and there was a chance for a deadlock in those. I actually only managed to reliably reproduce it while looking at another issue I saw when I was testing your save.

 

The hang is not related to antismuggle, the ivec3 issue, weakupdate, your mod, tracing, AI Faction with index 0, or invoking "exists" in "".

It's actually completely random due to parallel execution and in a completely different subsystem.

Link to comment
Share on other sites

  • Boxelware Team
I appreciate you taking the time to explain this. Out of curiosity, do you have a rough ETA on when the next beta patch with this fix will be deployed?

No Problem! We don't give out ETAs for such things, but the update will go out soon.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...