[Rseding91] Game stalls when saving map

This subforum contains all the issues which we already resolved.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[Rseding91] Game stalls when saving map

Post by Mylon »

Server stalled when saving the map. I was still getting messages when people leave, though.

http://imgur.com/a/OWvN7

Attached is the log
Attachments
factorio-current.log
(3 MiB) Downloaded 84 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16029
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Game stalls when saving map

Post by Rseding91 »

Thanks for the report. The log file shows that the server errored due to a script error in the "dangOreus.lua" file and at that point it stopped processing the game.

The bug appears to be it didn't kick everyone out of the game at that point.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Mylon »

The script uses try/catch logic to prevent errors from halting the game so that should not have been a problem.

The event in question is on_chunk_generated, so for some reason it's passing a 0 size area (event.area.left_top == event.area.bottom_right) which I did not account for.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16029
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Rseding91 »

Mylon wrote:The script uses try/catch logic to prevent errors from halting the game so that should not have been a problem.

The event in question is on_chunk_generated, so for some reason it's passing a 0 size area (event.area.left_top == event.area.bottom_right) which I did not account for.
Curious: why pcall everything in your mod? Surely it's better to crash and be notified that the mod is broken than for it to silently write errors to the console and just not work for random people.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Mylon »

When running a server with 20 people using code from multiple authors, it's better that 1-2 functions error than the whole server is brought down.

These mods can be difficult to test, and in many cases they result in non-critical errors.

For example, dangOreus destroys most entities when placed on ore, then autofill checks those entities to see if it's a gun turret and if so insert ammo. As the entity is already destroyed, this causes an error. But not inserting ammo into a dead entity has no effect on the game. (I fixed it anyway to keep the log clean)

The other error involves changing map generation. I was not expecting it to be passed a chunk with 0 area, and when this happens it causes an error but it appears to be non-critical.
Last edited by Mylon on Thu Jun 29, 2017 1:04 pm, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16029
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Rseding91 »

Mylon wrote:The other error involves changing map generation. I was not expecting it to be passed a chunk with 0 area, and when this happens it causes an error but it appears to be non-critical.
The game never passes a chunk with a zero-area size. That must be some other mod calling the event manually or there's some serous error happening.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Mylon »

Rereading the code, the bug was when placing an entity with 0 bounding-box size, not during map genertion. I'll fix that one. Thanks for your help.

(Again, non critical error so it has no effect on the game)
Rseding91
Factorio Staff
Factorio Staff
Posts: 16029
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Game stalls when saving map

Post by Rseding91 »

This should be fixed in 0.16. If it happens again once it's released let us know.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”