1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Multiplayer Woes

Discussion in 'Bugs and Crashes' started by DocCox, Jan 14, 2012.

  1. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    For debugging OoS problems I need both the OoS log (in the BtS exe folder) and the random logs from the different players (not only from the host, as the difference in those logs is the important thing).
     
  2. BJ69

    BJ69 Chieftain

    Joined:
    Sep 7, 2012
    Messages:
    11
    I'll see if I can get that for you, thanks.
     
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    AIAndy: My wife and I can collect a lot of these for you if you're prepared to work on them at all. It's still going to take a lot of reading and new comprehension for me to figure out how to effectively debug these OOS errors.

    However, once I get the combat mod fully sorted out I do plan to make learning this a top priority since we can't play without these being fixed and they tend to pop up a lot as we go along modding(and I really don't want to be inadvertently creating these problems either.)
     
  4. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    Please collect and post them and I will have a look at them.
     
  5. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    K... soon as I have some out of modding time to try a game again I'll start sending you heaps of them!
     
  6. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    Here's a log set from last night's play.
    http://www.mediafire.com/?jbtdwtrcmdd967o

    These aren't unresolvable and when they come up are accompanied by an error in RoMEventHandler that repeats over and over until one of us looks into the other player's city. The offense happens on build completions and animals being used to construct buildings. Mentioned before and Koshling said he thought he had an idea what created the problem but I was unable to understand the functional concept behind how to solve it.
     
  7. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Can you point us at where it was discussed before?
     
  8. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    The RoMEventHandler thing is detailed in PythonErr. It runs into some bad characters when it tries to write the OOS log. Unfortunately that means the OOS logs are not written completely. None of the OOS logs are actually available from both computers and the ones from Whisperer all end before the unit class Armor.
    The random logs are equal so it does not seem to be a RNG problem.
     
  9. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    I found the issue with the OOS log.
    In the combat mod you used a text key that already existed: TXT_KEY_UNIT_ARMOR. It was used for the name of the unit "Armor".
    On one computer it always read the wrong one for writing the unit name into the OOS log which resulted in a bad character, because the parameter that your TXT_KEY_UNIT_ARMOR needs is missing.
    Unfortunately that destroyed the OOS log so no investigation into the OOS causes is possible. Please fix the double TXT_KEY and try again.
     
  10. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    Last page on this thread.
     
  11. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    Ah... ok. Good catch.
     
  12. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Don't think it is this, because the recalculation process is deterministic and both machines would have the cached value marked as dirty, so any access by the other machine would also force a recalc and no observed value should be OOS.
     
  13. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    When the other machine looks at the offending city the error clears up. Could that be why then?
     
  14. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Yes, but I don't see how it could OOS without anything looking at the value - if nothing looks how does it realize the values are different to generate an OOS? I guess if something looks directly at some member variables instead of using the access methods that might do it. I'm not sure how the OOS code checksums the state, so maybe it does something like that in there??
     
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    OK, lets try this again then shall we?

    I have 5 OOS's to report here. All were somewhat mysterious as to what was taking place except for the first one, that took place when the initial cities were built.

    Still able to repair a lot of OOS errors in play by looking into the city that had a building built by a unit, though I don't think that's the only cause that creates an OOS where we sometimes are able to fix the OOS this way.

    Anyhow, here's the OOS reports.
     
  16. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    For the turn 0 one the OOS log from Whisperer is missing.

    3 of the other OOS happen because the total commerce value is async. Together with your statement that you were able to repair OOS by looking at a city I'd say that the issue is commerce caching, likely a missing dirty setting.
    You mention that it mainly happens when you build a building with a unit?

    There is one OOS that has a wanderer at a different position. Are your BUG automation settings identical?

    EDIT: I think I know what causes the commerce OOS (which is probably very common). When the city commerce changes, it sets the dirty flag for the city, but not for the player but the OOS check queries the player value. If you look at a city, the commerce of the city is calculated and only that recalculation sets the player commerce dirty.
    So in general the dependencies between the city and player commerce cache need to be reconsidered.
     
  17. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    Really? Dang... too late to get it now.

    Yes, but its not the only cause. Sometimes it just happens and we wonder why/how. One funny thing there, when I deselect a plot that had been working (on the city screen) it will flip over to OOS status until I reselect another plot for it to work. Crazy stuff.

    I believe they'd be unless she changed something I'm unaware of. I'll ask her when I can. But something valuable to note on THAT one... I believe that was where my system saw her win an battle while HER system saw her unit die. HOWEVER, and this was really strange - the message she was given stated she'd WON! (Yet the unit had died on the screen...) I've never seen anything like that before.

    Interesting. If you figure out how to fix that I'd love to see what you did there.
     
  18. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    Ok, definitely not the BUG settings then. Maybe a bug in the fighting code from the combat mod?
     
  19. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,692
    Gender:
    Male
    Location:
    Las Vegas
    I wouldn't rule it out of course, but I'd think what little of the combat mod is in use would throw us OOS with every combat if it was going to at all.

    There was nothing in the random logs that suggested where it went off track?
     
  20. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,414
    The RNG was still in sync when the OOS log was written (test random numbers get written in both logs to check that) so it is likely that there is no RNG issue involved.
     

Share This Page