IntQuant / noita_entangled_worlds

True coop multiplayer mod for Noita.
Apache License 2.0
386 stars 17 forks source link

0.27.1 crashed steam, proxy and game when too much note spells + luminous drills with homing were casted on a robot. #197

Open kcalbxof opened 1 month ago

kcalbxof commented 1 month ago

Basically title. My notebook froze for a solid minute, then unfroze and straight up killed whole stack. Maybe 0.27.2 would have fixed it, but sadly it was released whilst i was in a run. Had three people in a lobby, all three save files were corrupted (bug screen has appeared after trying to load), and proxy havent had any save state in it. Dumps do not show any good info about crash (all dumps are network asserts, e.g. Assert( Trying to close low level socket support, but we still have sockets open! ):/data/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp:3931) Sadly my first god run was lost. Keep up the good work though, and thank you for your mod! It made noita experience 100x funnier. I will try to make a pull request in a future when i will have time, want to do some improvement on a GUI from a UX standpoint.

IntQuant commented 1 month ago

IIRC the bug screen appears if the game loads for too long, but you can try to wait for a while more and it might load.

Are you running linux? Could it be an out of memory thing that took out steam, proxy and the game?

kcalbxof commented 1 month ago

About waiting - did so for a solid 30 minutes, it did never load.

Yes, i am running linux, lutris, and SpaceWar hack for steam networking, obvious oversight on my part not telling such info, sorry! OoM is unlikely since system is pretty beefy - 14 core cpu, 16 gigs ram, 1tb ssd. Weirdly enough - chrome was still running out of all things after crash. I think it was DoS in a network stack somewhere between steamworks & proxy & noita, seems more likely considering direction of failure.

I dont think this issue is really could be solved per se, since i do not have enough info about it, so you could close it as not planned, but i wanted to raise awareness about it. Nonetheless, wouldve liked to have udp network stack for local gameplay instead of websockets, they were really laggy, and steam way (i think it uses udp hole punching?) is kinda hard to set up when different OSes and "versions" of game is installed. (had to learn how to use set command in windows to help my friend set enviroment up for proxy, it was fast but still an extra step).

IntQuant commented 1 month ago

Yeah I would need to get more info in order to even try to fix that.

Connect by ip currently uses QUIC protocol (which is on top of UDP), it should be mostly ok. It doesn't handle unreliable packets properly yet tho. Websocket is used between local noita and proxy, and should be fine because it's, well, local. Using udp here would likely only make things harder than they should be.

kcalbxof commented 1 month ago

Connect by ip currently uses QUIC protocol (which is on top of UDP)

Ah, yes, i missed that when taking a glance in wireshark. Checked code, yes, now i see!

Sadly, QUIC is throttled/blocked in some countries due to it being used to circumvent DPI systems, which seems to be the case in my situation (see attachment, green result is my ISP, grey is friends'). This might be the case why QUIC was acting up, while host (me) was playing just fine, my friends were unable to even aim at things.

I understand why QUIC was a choice, but can we have something else to fall back on? I saw UDP transport crate being in development, could be big for our situation.

Screenshots

![IMG_20241021_184453_791](https://github.com/user-attachments/assets/693dd8b8-64e9-43fa-9b07-4833a33260b1) ![Screenshot_20241021-211555](https://github.com/user-attachments/assets/e433de4e-317d-4fe2-b071-36320d44cc7c)

UPD: same ISP, but notebook which was used as a host - QUIC blocked. Also tried with another ISP in a town nearby (via OpenVPN w/ full routing), sadly result was the same.

Screenshot

![image](https://github.com/user-attachments/assets/f667617c-41da-4d2c-a0bc-3416e1215103)

IntQuant commented 1 month ago

Tangled was using a custom protocol on top of UDP, but it was lacking several features (packet fragmentation, reliable ordering) and I figured out it wasn't really necessary to reinvent the wheel and simply replaced UDP with QUIC.