protonscr

SpellForce 3: Soul Harvest

protonopen appid 817540Game compatibility - Unofficial
ValveSoftware/Proton#3155 · opened 2019-10-16 by o-bri · updated 2023-02-06 · 9 comments · github · game page · search this game
Oo-bri 2019-10-16 github

Compatibility Report

  • Name of the game with compatibility issues: Spell Force: Soul Harvest
  • Steam AppID of the game: 817540

System Information

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

steam-817540.log

Symptoms

The Game seems to run in Single Player Mode.
But it is not possible to host a coop session, to play with another player in coop.
In the main menu of the game, I tried this:

  • Choose "Campaign" --> "Coop" --> "Host Game" --> "Create Lobby"

Then, after a few seconds, it gives the Message "Network Request failed. (unknown error)"

I tried this yesterday and today, also the one I wanted to play with tested it (similar PC with Kubuntu).

Reproduction

Just follow the steps mentioned above :-)

20191016183855_1

Kkisak-valve maintainer 2019-10-16 github

Possible lines of interest from the log:
err:winsock:interface_bind Failed to bind to interface, receiving broadcast packets will not work on socket 04b4.
sendto failed with code -1 for char 5 and length 1464.

Nnstgc 2022-04-23 github

It may be worth pointing out that this happens when you try making a Solo/AI game. Also, this applies to Journey Mode. From what I've gathered, the issue is also present on Windows 10 (but not 11). Which is odd given 10 is explicitly listed as supported, while 11 is not.

Bbeef331 2022-06-27 github

I am not C programmer but the cause of this issue seems to be

https://github.com/ValveSoftware/wine/blob/a7618abea5ffeb3bfb1e69c0dbcdc1008bd88163/dlls/ntdll/unix/socket.c#L813-L825

Adding in the following for testing resolves the issue but is clearly a hack. I think what is happening is that it passes a nil address and a length of 0 which I guess means in Windows land "localhost", but I could be wrong.

        else if (errno = EINVAL){
          async->sent_len += 3000000;
          return STATUS_SUCCESS;
        }

Instead of a network error you get greeted with the proper screen and can even make a game and play!
image

DDarkestByte 2022-08-02 github

I am not C programmer but the cause of this issue seems to be

https://github.com/ValveSoftware/wine/blob/a7618abea5ffeb3bfb1e69c0dbcdc1008bd88163/dlls/ntdll/unix/socket.c#L813-L825

Adding in the following for testing resolves the issue but is clearly a hack. I think what is happening is that it passes a nil address and a length of 0 which I guess means in Windows land "localhost", but I could be wrong.

        else if (errno = EINVAL){
          async->sent_len += 3000000;
          return STATUS_SUCCESS;
        }

@beef331
i tried to reproduce this by inserting your code between Lines 819/820 and compiling wine (proton-ge-7.28 in my case) but it still wouldn't let me host a game. Then i noticed there is only one '=' in the condition of your code, which can't be right, so i changed it to '==' and that obviously fixed it. guess you just made a typo somehow.

thank you for this (albeit hacky) workaround. would be nice if you could specify where exactly you inserted the code and what it does there next time. took me a good 10 minutes to figure out where it should go and why.

i hope they manage to fix this network adapter problem in Spellforce itself, rather than making us linux users chase some workarounds. from what i've gathered it seems to be a problem with unused network adapters, which the game will try to bind to, because they are ahead of the active connection in the priority order for some reason. maybe due to a lack of priority all together. like @nstgc said, this is also an issue on windows 10 machines and their workaround is to disable all inactive network adapters. i wish we could do the same through wine somehow.

Bbeef331 2022-08-02 github

Ah sorry, for some reason the networking stack in spellforce calls the linux sendMsg with invalid values which causes an error, the following is the verbatim bodge fix:

    while ((ret = sendmsg( fd, &hdr, async->unix_flags )) == -1)
    {
        if (errno == EISCONN)
        {
            hdr.msg_name = NULL;
            hdr.msg_namelen = 0;
        }
        else if (errno == EINVAL){
          async->sent_len += 3000000;
          return STATUS_SUCCESS;
        }
        else if (errno != EINTR)
        {
            if (errno != EWOULDBLOCK) WARN( "sendmsg: %s\n", strerror( errno ) );
            return sock_errno_to_status( errno );
        }
    }
VVenkarian 2022-08-21 github

Hi any new on this ?
Is it possible to apply you fix on Proton-GE ?

DDarkestByte 2022-08-21 github

yes it's possible, i used proton-ge-7.28. just pull the proton-ge repository instead and modify the socket.c file before compiling it.

also i'd like to report that connecting to the hosted lobby still wasn't possible for me and a friend when we tried to play together. the lobby appears in the online list, but connecting to it will just time out. i'm not sure if that's because of this workaround or another problem all together.

i asked about this on the spellforce discord and they recommended trying the beta branch on steam which apparently contains some networking bug fixes. unfortunately i don't own the game on steam, so i can't verify if it works there. if someone does, please share if it works!

Bbeef331 2022-08-21 github

It's likely the bodge does not allow the game to work properly and just allows local skirmish to work. The beta branch does not behave differently.

Bbeef331 2023-02-06 github

This merge request does allow the game to work (played an online skirmish atleast). https://gitlab.winehq.org/wine/wine/-/merge_requests/2100 So whatever happens with that will hopefully solve the issues.

Nothing extracted yet.