libopenmetaverse
  1. libopenmetaverse
  2. LIBOMV-570

ObjectManager.InterpolationTimer_Elapsed causes Immensest lock condtions

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.2
    • Fix Version/s: 0.7.0
    • Component/s: Objects
    • Labels:
      None
    • Severity:
      Medium
    • Environment:
      All

      Description

      ObjectManager.InterpolationTimer_Elapsed causes Immensest lock condtions

      This function is called every .25 seconds:
      Its job is to keep the client predictiing the next postion of an object that is moving.
      Some servers might not send the client alot of TerseObjectUpdates and therefore was a good reason this code has existed.

      However on Secondlife server and OpenSim the servers tnd to keep the prim.Postion very freshly updated as needed.
      So often by the time this timer has foreached thru the objects (which on a sim with more than a couple hundred objects the simulator has already given very exact postions.
      The biggest concern though with this code, is that it it locks the Client.Network.Simulators[i].ObjectPrimitives while it does the ForEach.. often not getting a free lock and making it all the way thru the objects in the 1/4 second time it has.. so quite often its about 20 cycles behind on the timer.. meaning its starting for sure and using all the time it can.. the entire time locking the Simulators list and the Avatars/Objects dictionary.

      Gerernatly if I dont comment out the creation fo the timer and i am connencted to 4 sims with a total of 10,000 objects i will have a simulator timeout.

      My suggestion is for us to create a gridClient.Settings.USE_INTERPOLATION_TIMER = false;

        Activity

        Hide
        John Hurliman added a comment -

        There already is a setting to turn off the interpolation timer. I forget what it is called and I'm not in front of the code right now so I'll have to get back to you tomorrow. I'll also look at other possible ways of fixing this for people who do want to use the timer.

        Show
        John Hurliman added a comment - There already is a setting to turn off the interpolation timer. I forget what it is called and I'm not in front of the code right now so I'll have to get back to you tomorrow. I'll also look at other possible ways of fixing this for people who do want to use the timer.
        Hide
        John Hurliman added a comment -

        Resolved in r2889 with a few fixes to the interpolation timer behavior and a new setting to disable it entirely. Thanks for the report!

        Show
        John Hurliman added a comment - Resolved in r2889 with a few fixes to the interpolation timer behavior and a new setting to disable it entirely. Thanks for the report!
        Hide
        Douglas R Miles added a comment -

        During the construction of GridClient() it constructs the
        Objects = new ObjectManager(this);
        Which calls RegisterCallbacks(); whihch starts the timer.
        There is not enough time to set the USE_INTERPOLATION_TIMER = false;

        We might need to make this a static field in Settings. I know in my report I showed us using a non-static version. oops

        Show
        Douglas R Miles added a comment - During the construction of GridClient() it constructs the Objects = new ObjectManager(this); Which calls RegisterCallbacks(); whihch starts the timer. There is not enough time to set the USE_INTERPOLATION_TIMER = false; We might need to make this a static field in Settings. I know in my report I showed us using a non-static version. oops
        Hide
        Douglas R Miles added a comment -

        This PATCH will allow someone to

        Settings.USE_INTERPOLATION_TIMER = false;

        Before someone creates their first GridClient

        Show
        Douglas R Miles added a comment - This PATCH will allow someone to Settings.USE_INTERPOLATION_TIMER = false; Before someone creates their first GridClient
        Hide
        Douglas R Miles added a comment -

        Had to replace the .PATCH becasue i forgot to include the little change to ObjectManager.cs as well

        Show
        Douglas R Miles added a comment - Had to replace the .PATCH becasue i forgot to include the little change to ObjectManager.cs as well

          People

          • Assignee:
            John Hurliman
            Reporter:
            Douglas R Miles
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: