• Visit Rebornbuddy
  • Win 10 D3 Not Responding, error trace

    Discussion in 'Demonbuddy Support' started by txony, Dec 4, 2018.

    1. txony

      txony New Member

      Joined:
      Dec 4, 2018
      Messages:
      9
      Likes Received:
      1
      Trophy Points:
      3
      I was getting random crashes for the game (Not Responding), sometimes after 2 minutes, some times after half an hour, but haven't been able to play stock DB for longer than one hour. I tried DB Beta build, but that has a bunch of other issues. So I took a look at the logs myself, in my case it was crashing always with these entries in the log:

      Code:
      2018-12-04 04:53:44,260 [Main Bot Thread] DEBUG DefaultLogger (null) - [Trinity 2.6.448] [Avoidance]  Kite Shutter Triggered
      2018-12-04 04:53:44,261 [Main Bot Thread] INFO  DefaultLogger (null) - [Trinity 2.6.448] [Avoidance]  Kiting
      2018-12-04 04:53:44,262 [Main Bot Thread] DEBUG DefaultLogger (null) - [Trinity 2.6.448] Moving to Kiting
      2018-12-04 04:55:16,961 [Main Bot Thread] ERROR BotMain (null) - Exception during bot tick.
      Buddy.Coroutines.CoroutineUnhandledException: Exception was thrown by coroutine ---> System.Exception: Only part of a ReadProcessMemory or WriteProcessMemory request was completed, at addr: 23F748D4, Size: 4
         at GreyMagic.ExternalProcessMemory.ReadByteBuffer(IntPtr addr, Void* buffer, Int32 count)
      
      I am using stock DB and Agrael Trinity.

      I went to the code to try to figure out where exactly those lines get in the log, I found in RoutineBase.cs in the HandleKiting() method is where the Avoidance is triggered, and after casting the defensive spells it goes to the moving step, which never ends. I realized that even if D3 is stuck, DB still works, and when opening the settings window and closing it, new 'Moving to Kiting' entries were added to the log.

      I did a trial/error crappy test with, and went ahead and commented the return statement in that method, moved the return to the previous line, so from:

      Code:
              public virtual async Task<bool> HandleKiting()
              {
                  if (!Core.Avoidance.Avoider.ShouldKite) return false;
                  if (!Core.Avoidance.Avoider.TryGetSafeSpot(out var safespot) || safespot.Distance(ZetaDia.Me.Position) < 5f) return false;
      
                  Core.Logger.Log(LogCategory.Avoidance, "Kiting");
                  await CastDefensiveSpells();
                  return await MoveTo.Execute(Core.Avoidance.Avoider.SafeSpot, "Kiting", 3f, () => Core.Avoidance.Avoider.SafeSpot.Distance(Player.Position) < 3f);
              }
      
      To:

      Code:
              public virtual async Task<bool> HandleKiting()
              {
                  if (!Core.Avoidance.Avoider.ShouldKite) return false;
                  if (!Core.Avoidance.Avoider.TryGetSafeSpot(out var safespot) || safespot.Distance(ZetaDia.Me.Position) < 5f) return false;
      
                  Core.Logger.Log(LogCategory.Avoidance, "Kiting");
                  return await CastDefensiveSpells();
                  // return await MoveTo.Execute(Core.Avoidance.Avoider.SafeSpot, "Kiting", 3f, () => Core.Avoidance.Avoider.SafeSpot.Distance(Player.Position) < 3f);
              }
      
      And DB has been going for almost 30 hours straight now, not a single crash .. hopefully I didnt just jinxed it. Anyway, my demon hunter dies a little more since he doesn't move away to a safe spot, but who cares when I can leave it playing over night.

      Hope this helps.
       
    2. DontBanMeBro

      DontBanMeBro Member

      Joined:
      Sep 4, 2017
      Messages:
      34
      Likes Received:
      8
      Trophy Points:
      8
      I deleted my other reply because I guess I didn't read the whole post.
      MoveTo.Execute sounds like its deadlocking while waiting to return you a result, so by commenting it out and instead returning the value of await CastDefensiveSpells(), you're essentially just returning true every time, so I would assume no kiting is really going on, right?

      Probably need to look into MoveTo.Execute and find out where that exception is happening and return a result when it does
       
    3. DontBanMeBro

      DontBanMeBro Member

      Joined:
      Sep 4, 2017
      Messages:
      34
      Likes Received:
      8
      Trophy Points:
      8
      In MoveTo.cs, you can try adding a counter for this while loop and when X iterations happen, just break out of it and continue on (or just return false):

      Code:
      while (ZetaDia.IsInGame && location.Distance2D(ZetaDia.Me.Position) >= range && !ZetaDia.Me.IsDead) { }
      same with this one just to be safe:

      Code:
      while (ZetaDia.Me.LoopingAnimationEndTime > 0)
      It's also possible that it's deadlocking on await Coroutine.Yield(), but you'll have to add some extra logging to pinpoint where it is
       
      Last edited: Dec 6, 2018
      txony likes this.
    4. txony

      txony New Member

      Joined:
      Dec 4, 2018
      Messages:
      9
      Likes Received:
      1
      Trophy Points:
      3
      you where spot on, it gets stuck inside the first while loop in the MoveTo.cs file. It only happens sometimes when the linear distance never gets above the range, I believe is because there is no room to move farther out in that direction but I am not quite sure since it freezes.

      I've added a counter of 5 attempts and break out of the while loop and it seems to be kiting properly now, is been running for about half an hour with no issues, I will leave it playing during the day and get back here after I check the logs for the new break condition.

      thanks!
       

    Share This Page