Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Movement stops completely and never resumes

  • Product: WRobot General
  • Type: Bug
  • Status: Unconfirmed

In my battlegrounder product, which worked fine for ages now that I'm testing more thoroughly on WotLK, movement sometimes stops entirely and never resumes.
Sometimes this happens in combat, usually when calling this code (on my own thread):

WoWPlayer healer = ObjectManager.GetObjectWoWPlayer()
                .Where(o => o.Reaction == Reaction.Hostile && o.IsAlive && o.IsHealer() && o.GetDistance <= 45)
                .OrderBy(o => o.GetDistance).FirstOrDefault();

            if (healer != null)
            {
                Fight.StopFight();
                Thread.Sleep(500);
                ObjectManager.Me.Target = healer.Guid;
                Fight.StartFight(healer.Guid);
                Logging.Write($"[BG] Switching to healer: {healer.Name}");
            }

Code like this is then ignored (but sometimes this also seems to stop movement. Everything works fine - code is still called. The bot just NEVER moves anymore.
 

if (_currentLandMarkAction == null || tMapLandmark?.Landmark.X != _currentLandMarkAction.Landmark.X || tMapLandmark?.Landmark.Y != _currentLandMarkAction.Landmark.Y)
            {
                _currentLandMarkAction = action;
                Logging.Write("[BG] Go to zone " + _currentLandMarkAction?.Landmark.Name);
                if (!Me.IsSwimming)
                {
                    MovementManager.StopMove();
                }
            }

            if (!MovementManager.InMovement && _currentLandMarkAction?.Landmark.Distance > 5)
            {
                if (!MovementManager.InMovement)
                {
                    var npoints = new List<Vector3>();
                    npoints.AddRange(PathFinder.FindPath(_currentLandMarkAction?.Landmark?.Position));
                    MovementManager.Go(npoints);
                }
            }

When I hit "stop" on the product, it freezes and never stops. If I press pause as well, it unpauses. Seems like a freeze/multi threading issue but I don't understand how?
Do you have any idea what could cause this? I'm at a loss.

User Feedback

Recommended Comments

Matenia

Elite user

It's not related to either code snippets - although they both stop working.
I've determined it only happens with one fightclass. However, the fightclass itself does not touch movement. 

I think it might be related to Lua because in combat I've gotten the Lua error "stackoverflow, table too big to unpack".

Matenia

Elite user

Problem found: I was using Me.ForceIsCast = true and it never actually reset 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.