Page 1 of 1

[0.13.5 LAN game crashes with more than 10 mods

Posted: Fri Jul 08, 2016 8:36 am
by heartbreakkim
When I start a default settings LAN game with more than 10 mods, the attached crash happens within around 30 seconds. It doesn't matter what combination of mods, as long as there's more than 10. Attached is the log and mods folder. I tried to screenshot but this time the alert didn't appear, the game just froze. My partner can also reproduce this on a different Mac.

Steps to make a game/reproduce:

* Enable 11 or more mods
* Play -> Multiplayer -> New game -> Generate -> Lan -> Start

Alert message:
'Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums
Result:

Have to force quit Factorio as it's unresponsive.

Versions:
Factorio 0.13.5 (build 23107, mac, steam)
Operating system: Mac OS X 10.11.5
Can someone please close (originally thought it was the mods causing the issue)?:
viewtopic.php?f=51&t=28395&p=180276#p180276
viewtopic.php?f=49&t=28444

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Fri Jul 08, 2016 10:21 am
by Loewchen
94.215 Info PosixUDPSocket.cpp:50: Opening socket at port 0
I have seen that before, can not find where though.

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sat Jul 09, 2016 10:39 am
by mr_oyster_meister
Happens for me too with the same symptoms.
Using Factorio 0.13.6 under OS X 10.10.5. Also had the same error with Factorio 0.13.3

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sat Jul 09, 2016 1:47 pm
by heartbreakkim
On Linux Mint 17.3 and Windows 10 it works as expected with Factorio 0.13.6.


Looks like an OSX thing.

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Mon Jul 11, 2016 6:19 pm
by Kortak
hmm...strange.

I have 18 mods installed and the only thing I play is LAN with someone in my home...no errors
This was in all versions up to 0.13.7


(windows 64 bit version by the way )

edit: ah i see its on MAC..

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sun Jul 17, 2016 12:54 am
by NotABiter
Based on the bit of the log that bobingabout quoted here: viewtopic.php?f=51&t=28395#p180050

My guess is that adding more mods is causing UDP packets to get large enough to exceed your MTU.

(One could partially confirm this by using a network sniffer and seeing if max packet size does indeed increase as you add more mods. The other part is checking the MTU size for your network stack and seeing if that packet size is getting close to the MTU.)

IF that's the case, then:

You might be able to fix it by adjusting the MTU on your mac, e.g.: https://support.zen.co.uk/kb/Knowledgeb ... .6-to-10.9
(disclaimer: I don't use a mac and have no idea if that link is actually useful.)

The only way for the game to automatically overcome the issue would be to bust up its current packets into multiple smaller packets (and then reassemble them on the receiver) so each individual packet stays below your MTU.

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sun Jul 17, 2016 4:46 pm
by bk5115545
The devs could probably fix this by sending Mod ID's and version numbers instead of full mod names. They could then binary compress the data part of the packet (maybe with some pre-shared AVL tree embedded into each game version) to amplify the savings.
There would still be a limit but it might be much higher (2x or 3x higher).

Or they could change the protocol for client+server startup to receive packets that list mods until a known message is received (like recieve mod packets until the message "END_OF_MOD_LIST" is seen).
This would mean that the server could host a basically unlimited number of mods but might make the connection process significantly slower (but only the connection process).

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sun Jul 24, 2016 10:50 am
by heartbreakkim
NotABiter wrote:Based on the bit of the log that bobingabout quoted here: viewtopic.php?f=51&t=28395#p180050

My guess is that adding more mods is causing UDP packets to get large enough to exceed your MTU.

(One could partially confirm this by using a network sniffer and seeing if max packet size does indeed increase as you add more mods. The other part is checking the MTU size for your network stack and seeing if that packet size is getting close to the MTU.)

IF that's the case, then:

You might be able to fix it by adjusting the MTU on your mac, e.g.: https://support.zen.co.uk/kb/Knowledgeb ... .6-to-10.9
(disclaimer: I don't use a mac and have no idea if that link is actually useful.)

The only way for the game to automatically overcome the issue would be to bust up its current packets into multiple smaller packets (and then reassemble them on the receiver) so each individual packet stays below your MTU.
Thanks for the suggestion, I'm on El Capitan (10.11) following this link https://support.apple.com/kb/PH21660?lo ... cale=en_US my mac's already set to the max MTU size (1500) :(

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Fri Jul 29, 2016 9:40 pm
by nefreyu
Same issue here on OSX with LAN multiplayer. Can have 8 or 9 mods, but with 10 it always crashes, might indeed have to do with the length of the mod-names.

Any work around possible? I'm having a hard time selecting which 8 mods to play with, would really like to use a few more :)

Most relevant part of the log:

Code: Select all

  87.639 Info GameActionHandler.cpp:2709: MapTick(6) processed PlayerJoinGame peerID(0) playerIndex(0) mode(create)
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x1005b9c02 in Logger::logStacktrace(StackTraceInfo*) (in factorio) (Logger.cpp:382)
#1  0x1004c54a7 in LANServerGameUpdater::sendFullState() (in factorio) (ServerGameUpdater.cpp:275)
#2  0x1004c50a8 in LANServerGameUpdater::run() (in factorio) (ServerGameUpdater.cpp:252)
#3  0x100b3cfa5 in boost::(anonymous namespace)::thread_proxy(void*) (in factorio) + 165
#4  0x10690ac4f in 0x10690ac4f
#5  0x10690ab9f in 0x10690ab9f
#6  0x10690a3d5 in 0x10690a3d5
  90.799 Error ServerGameUpdater.cpp:275: Failed sending LAN game broadcast: Sendto failed: Message too long

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sat Jul 30, 2016 7:48 am
by nefreyu
WORKAROUND

The problem is the max UPD-package limit, by default OSX has limited the maximum UDP-package to be 9216. This can be increased (until you reboot) with the following command:

Code: Select all

sudo sysctl -w net.inet.udp.maxdgram=20000

As per StackOverflow (second answer): http://stackoverflow.com/questions/2281 ... e-too-long

*update
While this seems to work for new games, resuming an old save with more mods still gives the same error for me :(

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Mon Aug 08, 2016 1:38 pm
by respectTheCode
This appears to only impact the server. With a Windows server and a Mac client everything works. With a Mac server the game hangs when any OS views the Play on LAN screen.

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Sat Aug 13, 2016 11:04 pm
by doktorstick
Can confirm this exists in the latest version 0.13.15 on Mac OS X (El Capitan) with 29 mods.

Code: Select all

  53.247 Error ServerGameUpdater.cpp:275: Failed sending LAN game broadcast: Sendto failed: Message too long
Factorio crashed. Generating symbolized stacktrace, please wait ...

Re: [0.13.5 LAN game crashes with more than 10 mods

Posted: Fri Aug 26, 2016 1:45 pm
by kovarex
Solved in the 0.14.x version