-
Notifications
You must be signed in to change notification settings - Fork 116
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
Matcens sometimes stop working too early in co-op #386
Comments
This sounds rather like #132, which not only was reported, but was reported by AFPilot. ;) Even so, it's good to get a reminder report on it. That ticket has been idle since 2015 waiting for further information on how to reproduce the problem. I don't recall seeing this in 0.57.3, but I might have missed it. I think I only ran the multiplayer cooperative campaigns once in 0.57.3. You say it's frequent in co-op games. Do you have a sense for how frequent? Can I count on it happening every time, only every other time, etc.? You speculated on a network-related race condition. Is it accurate to say then that hosting a cooperative game that no one joins is insufficient; that instead, the game must be cooperative and guests must join? If so, do you have any sense whether the guests need to do anything? This would be easier to investigate if I can just join some dummy guests and leave them sitting in the start area. If I need real people driving each of the guest Pyros around the level, this will be more challenging to debug. |
It seems to happen in the ballpark of 50% of the time per level. That's just a rough guess though. It's not guaranteed to happen but happens often enough that going through a level set we generally will have seen it several times. The reason I was guessing network-related is that it doesn't happen in single-player... though it's possible there's some other difference between that and co-op. Other co-op bugs we've seen in past (including in vanilla D2) have come from things like dropped packets or contention between clients (thiefbot jitter) which makes it somewhat suspicious. I'm unclear on whether the other players need to do anything, though. That would need experimentation, though I should be able to get volunteers for the purpose. I also haven't proven whether other people need to join the game, so that's worth looking at. |
Volunteer testers could be helpful, thanks. If possible, I'd like to have your test runs use a modified build with debug logging for matcen operation. I'll try to write up the logging patches today. |
This should not be part of a release. It is intentionally chatty at default levels. However, it uses an internal governor to try to avoid excessive logging. This is intended to help debug issue #386.
I pushed Log various matcen logic to debug/matcen-386 with debugging patches. Please get as many of your volunteers as possible to use this branch, rather than master. After you see a problem, once you exit that game, grab the gamelog.txt and attach it. Anything you can record about the time of day when you saw the problem will help me match the log to the failure. |
Based on what I noticed while writing the logging patch, I did some investigation of how the accounting works. Currently, it looks like multiplayer games will be reliably broken. It won't fail for you 50% of the time. It will always fail eventually. If I am right, the intermittent results are related to whether you trigger the matcen enough times to hit the faulty cap. If you do not keep reactivating it, you may not build up enough robots for it to break. The test on line 393 is why the matcens stop producing, but that is not the bug. dxx-rebirth/similar/main/fuelcen.cpp Lines 392 to 396 in 53a1d5f
This test is meant to prevent generating too many robots if the player is not destroying them in a timely manner. However, |
Ouch. Do you still want the testing done? I've been a little preoccupied this weekend but if you'd still find the traces useful I can still get some folks together. |
Materialization centers ("Matcens") have a governor to prevent overrunning the level in robots. However, due to a logic ordering error, multiplayer games failed to record how many robots had been destroyed, so for the purpose of detecting whether there were currently "too many" robots in play, the game pretended that no robots had ever been destroyed. Therefore, once enough robots had been created to reach the "too many" threshold, matcens stopped generating robots, regardless of how efficiently the player(s) had been destroying robots. Reported-by: Mako88 <#132> Reported-by: Sirius-TR <#386>
Yes, but include in your test the commits I just pushed (Update num_kills_level/num_kills_total in multiplayer, Update num_kills_level/num_kills_total for remote kills). The first commit seems to fix the problem for me in the five minutes I spent on Descent: First Strike level 6 at Insane level running a "cooperative" game with no one else present. The second should address multiplayer, but is only compile-tested. If I am right, this should fully resolve the problem. |
I believe this is resolved by the change above. No response in roughly two weeks. Closing. @Sirius-TR, if the problem persists, please reopen. |
commit eec2fb3 upstream. Materialization centers ("Matcens") have a governor to prevent overrunning the level in robots. However, due to a logic ordering error, multiplayer games failed to record how many robots had been destroyed, so for the purpose of detecting whether there were currently "too many" robots in play, the game pretended that no robots had ever been destroyed. Therefore, once enough robots had been created to reach the "too many" threshold, matcens stopped generating robots, regardless of how efficiently the player(s) had been destroying robots. Reported-by: Mako88 <#132> Reported-by: Sirius-TR <#386>
It was brought to my attention that this hadn't been reported (thanks afpilot).
There is a seemingly random occurrence seen frequently in co-op games where all robot makers/matcens in a level will stop working. When this happens, all currently active matcens immediately stop producing anything, and matcen triggers no longer cause robots to be produced, regardless of whether the matcen the trigger pointed to has been exhausted or not.
The break typically happens while a matcen is in its production cycle; it will seemingly try to spawn a robot and may light up, but no robot is produced.
I get the feeling a race condition may be involved, possibly related to network state sync; I've seen it frequently in co-op, but never in single-player. It's also a fairly old bug; I don't remember whether it was observed in 0.57 (it may have been) but I'm pretty sure it was in 0.58.
The text was updated successfully, but these errors were encountered: