Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client unable to load save files larger than 10 MB #353

Open
SordX opened this issue Mar 1, 2024 · 7 comments
Open

Client unable to load save files larger than 10 MB #353

SordX opened this issue Mar 1, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@SordX
Copy link

SordX commented Mar 1, 2024

When a save file exceeds 10 MB, the game gets stuck on the waiting for 2nd player to load screen. There is an error in the Player.log
[ERROR] [SteamServer] Failed to send message, result: k_EResultLimitExceeded

The problem appears to be caused by defaultBufferSize value in MultiplayerMod.Platform.Steam.Network.Configuration, which is set to 10 MB. Changing this value to a size larger than the save file allows the save file to load.

Attached is an example save file that is larger than 10 MB.
The Data Dump 2 Cycle 745.zip

@doctorcito0013
Copy link

I am also facing this issue. I have found the value in cause inside the code and I raised it a bit . But I have some troubles during compiling the mod in order to test. :-(

@SordX
Copy link
Author

SordX commented Mar 3, 2024

I also was unable to get a working mod compiled, but found I could use dnSpy to edit the Steam version of the mod. Although it is a bit trickier as the compiled version bakes in the constant, so I changed SendBufferSize to always set m_val to 20 MB. I've also attached my modified steam MultiplayerMod.dll if you just want to swap in a replacement.
MultiplayerMod.zip

@doctorcito0013
Copy link

oh thanks a lot @SordX, I will try your change with my friend this evening.

@polycone
Copy link
Member

polycone commented Mar 6, 2024

Hi @SordX, @doctorcito0013,
I'll look into that when we will be implementing a new networking layer. As I see it's a case of overprovisioning and we need to make a thing to control the stream, wait for flush or something. Anyway, yes, for now it's okay to just increase the buffer size.

Also what happened with the compilation? 🤔
If there's a problem with IDE you can try the following (should work fine on Windows and Linux, PATH_TO_STEAM_LIBRARY must be replaced with the actual directory path)

echo "<Project><PropertyGroup><SteamLibraryPath>PATH_TO_STEAM_LIBRARY</SteamLibraryPath></PropertyGroup></Project>" > Directory.Build.props.user
dotnet restore
dotnet build --disable-build-servers src/MultiplayerMod/MultiplayerMod.csproj --configuration Release

And you can use Debug configuration to autoinstall the mod, but it works only on Windows for now.

Edit:
Sorry, I haven't thought maybe you're trying to compile it from v1.1.1-alpha then it could complain about some DLLs being locked, like

warning MSB3026: Could not copy....because it is being used by another process. The file is locked by: "MSBuild.exe (16252)

Just terminate the mentioned process and run the build again - I've tried it now and the build was successful.

@polycone polycone added the bug Something isn't working label Mar 6, 2024
@polycone polycone added this to the Quality of life 2 milestone Mar 6, 2024
@polycone polycone moved this to Todo in Multiplayer Mod Mar 6, 2024
@SordX
Copy link
Author

SordX commented Mar 7, 2024

@polycone
I'm building on Windows with MSVC. The compile seems to work fine and the mod appears to be installed fine, but I get an error when the mod attempts to connect to the steam server. I think it was this one:
[ERROR] [SteamClient] Failed to send Command [1b584018f1fd45dba60d6e75d71b2e82] InitializeClientCommand: k_EResultInvalidParam).

While trying to trace back the source of the problem, I noted that the SteamGameServerNetworkingSockets.CreateListenSocketP2P(0, networkConfig.Length, networkConfig) returns 0, which maps to invalid socket. Not sure if that is a problem, or an irrelevant result.

In any case, I can't setup a p2p session while running the mod after I build it.

@polycone
Copy link
Member

Does the distributed DLL work fine for you?

@SordX
Copy link
Author

SordX commented Mar 11, 2024

Yes, the DLL available on github works fine. Just did a test installing the github mod and was able to start the host without issue. Swapped in the MultiplayerMod.dll I built and the game gets stuck on "Starting Host" and my Player.log file has the "[ERROR] [SteamClient] Failed to send Command [49bb0b9971464aebb01f76520df502e7] InitializeClientCommand: k_EResultInvalidParam" error in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants