Multiplayer Woes

I've just found something that I think might be causing some OOS issues.

During evaluating units (what to build etc.) the AI throws some random numbers so that it doesn't always arrive at exactly the same conclusion (when things are close) every time. The routine that does this evaluation takes a parameter to tell it whether to use the async random number generator, or the synchronized one. It is important it gets told to use the correct one depending on whether the call is part of processing somthing that will happen on every computer, or just on one (which usually means a human UI interaction of some sort).

Anyway, this unit evaluation is called in evaulating trade agreements when unit trades are being proposed. Crucially this will include proposals from the human player that might be withdrawn rather than enacted (which means they will only run on one computer). Probably (I'm guessing now as to the motivations of the original code) the unit trading expected this to be a UI interaction and hence tells it to use the async random number generator. However, if this is an AI<->AI trade it will run on all computers and should therefore use the synchronized random number generator. If the outcome is the same anyway, it won't matter that the async got used in both places, but if the random number thrown actully influences the outcome (as it may in edge cases), then a different state will result at different computers and an OOS will eventually follow.

I can't push my fix right now because I'm in the middle of some other large changes, so my code is in flux. However, I have modified things so that the trade evaluation (and a couple of similar cases) now pass an extra flag, telling it not to use the random element at all (because it doesn't know whether it's in a context where it should use the async or whether it should use the synchronized). This will hit the SVN along with thrst of my changes later this week.
 
I can't push my fix right now because I'm in the middle of some other large changes, so my code is in flux.

That confirms the saying that
'a programmer is just a tool which converts caffeine into code' ^^


Great analysis, as always! :goodjobneo:
 
We've just got out of the game just now due to a problem that occurred last night as well... seems when I gift my Human player partner national units it not only throws us out of synch but it also gives us a repetitive error message... game doesn't crash but its extremely annoying... If I get the error again I'll report what its saying next time. I just thought it might be worthy of note to take a brief look at the gifting between players as well.

Nice catch too... but I wonder how often does the ai actually find motive to trade units? I mean, they NEVER propose it with a player so why would they be proposing it to each other?
 
We've just got out of the game just now due to a problem that occurred last night as well... seems when I gift my Human player partner national units it not only throws us out of synch but it also gives us a repetitive error message... game doesn't crash but its extremely annoying... If I get the error again I'll report what its saying next time. I just thought it might be worthy of note to take a brief look at the gifting between players as well.

Nice catch too... but I wonder how often does the ai actually find motive to trade units? I mean, they NEVER propose it with a player so why would they be proposing it to each other?
If you say repetetive error message, you mean a Python error?
 
We've just got out of the game just now due to a problem that occurred last night as well... seems when I gift my Human player partner national units it not only throws us out of synch but it also gives us a repetitive error message... game doesn't crash but its extremely annoying... If I get the error again I'll report what its saying next time. I just thought it might be worthy of note to take a brief look at the gifting between players as well.

Nice catch too... but I wonder how often does the ai actually find motive to trade units? I mean, they NEVER propose it with a player so why would they be proposing it to each other?

Not proposing it is not the same as not evaluating it
 
The error mentioned was something to do with a ROMEventManager error. I'm very sorry I didn't write down what it was saying for you guys... if it happens again I most certainly will.

And Koshling... good point. It's too bad, if the AI is advanced enough to evaluate the option, that it won't occasionally offer it, perhaps to make some $ for itself or in an effort to bolster its own forces in their own wars.
 
The error mentioned was something to do with a ROMEventManager error. I'm very sorry I didn't write down what it was saying for you guys... if it happens again I most certainly will.

And Koshling... good point. It's too bad, if the AI is advanced enough to evaluate the option, that it won't occasionally offer it, perhaps to make some $ for itself or in an effort to bolster its own forces in their own wars.

If it is a Python error it will show up in your PythonErr.Log file (not PythonErr2.log). Post that as it tells us the module and line that is causing the problem.
 
Ok, so I have to embarrassingly admit that I have no idea how to 'turn on logging' or find log files so that I can report them. I suppose its high time I learn my way through that if you could offer some guidance there ;)

BUT it happened again and I can share the error that it spit out (over and over and over and etc...)

Error in game update event handler <Bound Method RoMEventManager.onGameUpdate of <RoMEventManager.RoMEventManager instance at 0x19AB6C88>>

is what its telling me on the alerts. This time I don't think it had anything to do with gifting of units as we hadn't gifted any since we started up the game but I suppose it still could since she still owns national units she couldn't have made herself.
 
THANKYOU! I've been out of the loop too long it seems ;) I'll get that sorted out tomorrow and start sending you guys heaps of OOS data... we get them quite often (but THIS issue is just over the top.) It takes about 30 minutes for us to establish a game...when you get maybe two or three rounds (sometimes one) and it goes OOS on you, it gets a bit frustrating. (THAT's how much we love this mod and refuse to give up on it nevertheless!)
 
So go figure... I turn on logging and the game plays like a newborn baby all night. The only problem with OOS we had at all had to do with an identifiable bug with the Hot Air Balloon... once she moved it onto the water, she couldn't move them onto land without it going into an OOS where I could not, myself, see the troops moving back onto land. I will look, tomorrow, for the logging on that matter if it caught it at all.

Now... note, we DID update last night after playing so you may well have fixed the earlier noted problem somehow. (well done guys!)
 
Trying to play this with 2 friends who are on a LAN together. Within turn 1 the game OOS. The OOS value is the same for the 2 people on the LAN, but different for me. Tried rejoining and I ended up in a different starting location, but still OOS. Tried saving the game, then rehosting with the saved game but still the same OOS. Tried different people hosting, same thing.

Any idea what could cause this? I cant figure out how rejoining a game can cause an OOS. I mean, the game sends over the exact save file, so how can anything be out of sync.
 
aoklo: Honestly, the best way around that initial OOS for now is to use a different map. Perfect world seems to work fine but mongoose does not but they're working to address that soon. You may have found another map problem as well. The most recent SVN update could help too given that a number of these have been sorted out recently.
 
I realize this is probably a LOT more info than you need but I'm not sure what you want and what you don't so here's our logging info that may help to sort out the aforementioned issue with the balloon units.
 
I did some reading in the thread here and apparently I didn't include some of the files I should have. We started getting the dreaded RoMEventManager repeating error every few rounds again so I've got some more OOS reports for that. Apparently her system thinks I'm bringing in a bit more gold and research than mine does. But I've also found another interesting 'Theme' error that I'm not quite sure how to hunt down. In all cases, our log files clash on some unit naming issues as well which is really weird too. Anyhow, here's these... lemme know if you need more.
 
Scouring through the logs I reported, I believe I've narrowed the problem down to being an issue with the gift button, and/or Jainism or Sikhism spread buttons when those missionaries are sent on an autospread mission. I believe when they get to their destination, there is a conflict as to whether they should be allowed to spread or not. Beyond that, I'm not sure how to further hunt down the problem. As for the 'gift button' I'm not sure what exactly could be wrong there. Perhaps the game is giving conflicting info on whether a unit should be giftable or not.
 
Scouring through the logs I reported, I believe I've narrowed the problem down to being an issue with the gift button, and/or Jainism or Sikhism spread buttons when those missionaries are sent on an autospread mission. I believe when they get to their destination, there is a conflict as to whether they should be allowed to spread or not. Beyond that, I'm not sure how to further hunt down the problem. As for the 'gift button' I'm not sure what exactly could be wrong there. Perhaps the game is giving conflicting info on whether a unit should be giftable or not.
How did you reach that conclusion?

As far as I can see the only difference in the OOS logs is the commerce of Magillicutty, which his computer thinks he has 1 more than your computer thinks.
My guess would be a bad Python event that increased his yield somewhere by 1:commerce:.
Did he get any such event?
 
Admittedly, in testing, the conclusion proved false. It came from the other error log that I threw in that last upload.

I noticed that was the issue in the comparison but I figured that had something to do with having a spread not being counted properly. I realize that's incorrect. As for the Python event, I'm not sure how I would be able to see that. She states she didn't have any 'events' pop up - its possible the RoMEventManager Error might be a clue to what's going on there. But here's the really weird thing... at the beginning of our play session today, that error came and went, with us falling out of sync, then back in. It seemed to be when she went into a city screen it would start, then we'd go another round and it'd disappear, but then a few rounds later everything it seemed we did to make it happen wouldn't repeat the error. She did erase some spies that were being considered in 'friendly territory' when they clearly weren't and maybe that had something to do with it somehow.
 
Back
Top Bottom