OpenKore / openkore

A free/open source client and automation tool for Ragnarok Online
http://openkore.com
Other
1.29k stars 1.05k forks source link

ReStart - 'Stuck at X, while walking from Y' (Not AutoSell/Buy Bug) #1015

Closed koynro closed 7 years ago

koynro commented 7 years ago
Summary:

Character getting stuck - not moving at all. It does not appear to be doing any other actions, it simply cannot get up and go. If I relog / reload all / move around between different maps (butterfly wing) I can get it playing for a bit but I cannot consistently get it to be stuck, or be not stuck. Continuing to troubleshoot for a trigger to determine what is causing it to happen.

Using latest master branch

Affected configuration(s)/ file(s):

Console Logs

Stuck at payon (162,59), while walking from (162,59) to (150,58).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)
...
Stuck at payon (162,59), while walking from (162,59) to (228,329).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)
...
Stuck at payon (162,59), while walking from (162,59) to (228,329).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)
...
Stuck at payon (162,59), while walking from (162,59) to (228,329).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)
...
aiv
ai_seq (auto) = route
Active tasks: Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout
Inactive tasks: -
...
macro status
There's no macro currently running.
...
Stuck at payon (162,59), while walking from (162,59) to (228,329).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)
...
move 162 57
Calculating route to: Payon Town(payon): 162, 57
...
aiv
ai_seq (auto) = route
Active tasks: Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout
Inactive tasks: -
Stuck at payon (162,59), while walking from (162,59) to (162,57).
Stuck during route.
Calculating lockMap route to: Payon Cave(pay_dun02)

control/config.txt

lockMap pay_dun02

route_escape_reachedNoPortal 1
route_escape_randomWalk 1
route_escape_shout
route_avoidWalls 1
route_randomWalk 1
route_randomWalk_inTown 0
route_randomWalk_maxRouteTime 75
route_maxWarpFee
route_maxNpcTries 5
route_teleport 0
route_teleport_minDistance 150
route_teleport_maxTries 8
route_teleport_notInMaps
route_step 10
route_tryToGuessMissingPortalByDistance 1
Impact:

Unable to use openkore functionally

Expected Behavior:

To move to lockMap and begin attacking monsters

Actual Behavior:

I cannot quite determine what is triggering it to occur, but I simply get stuck in one position. If I am in a map with mobs I will attack things that I can from my position, not moving, but I will not move to pick up loot or attack new mobs.

Steps to Reproduce:

Unknown

koynro commented 7 years ago

I was able to get the bug to trigger by relogging on a map on the way to lockMap (while inside pay_dun00).

Here is a log with debug enabled while it happens, https://gist.github.com/koynro/0072c950f9c7283b650aa711d5d0b05a

sctnightcore commented 7 years ago

1006

alisonrag commented 7 years ago

just to test try to set this in control timeouts.txt

ai_portal_wait 3 ai_portal_give_up 20 ai_portal_re_add_missed 1300

koynro commented 7 years ago

@sctnightcore While the root issue may be the same, this has nothing to do with AutoSell/AutoStore/AutoBuy functions. As shown in my example, I cannot move to portal but also if I explicitly tell the bot to move x y it still fails to even do that.

I just tested, @alisonrag , your suggestion to no avail. As eluded to in my sentence above, the portals are not the issue so this update doesn't seem relevant. At least, it doesn't appear to be as I cannot move to an explicit location even on the same map.

When I tested this just now, my bot was already in lockMap and started killing stuff. But then I manually used a Butterfly Wing and got to Payon, and it got stuck. I closed the bot, restart openkore.pl, and it started going to lockMap. While mid-route to lockMap (still in Payon) I stopped openkore, and then restart it and the bot was stuck in place again. Used a Butterfly Wing, and was still stuck. Restart bot, and it was still stuck. reload all with bot still running, still stuck. relog and bot was still stuck. Restart openkore and bot started moving to lockMap.

I still can't seem to find a pattern as to what works and what doesn't.

alisonrag commented 7 years ago

in the top of window, the openkore show the current ai actions, are the actions ok? in the last week i was stuck because the openkore has queued a lot of actions

koynro commented 7 years ago

@alisonrag it is simply route

aiv
ai_seq (auto) = route
Active tasks: Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout, Timeout
Inactive tasks: -
koynro commented 7 years ago

It even just now happened again. I was in lockMap, loaded it fresh, and it is simply route

Stuck at pay_dun02 (19,63), while walking from (19,63) to (225,155).
Stuck during route.
Calculating random route to: Payon Cave (pay_dun02): 82, 102
Player Died: obfuscated (0) Boy Swordsman

I am fighting stuff, but only stuff that is next to me. In which it is route,attack,route and taking items also.

asheviii commented 7 years ago

I think I've encountered this problem before. The way I overcome it is by disable buyauto, sellauto and storageauto. Apparently, when you put coordinates to interact with tool dealer/kafra npc, it might just make your bot stuck during route. You should check this out if it works for you. It did work for me.

koynro commented 7 years ago

I realize that I am the one here asking for help, but it is not helpful to simply throw out ideas especially if you did not read the issue. I was very clear, even in the title, that not only do I not believe this is not an autobuy/autosell/autostore issue but also that the symptoms of my issue in absolutely no way indicate that it is.

While I would like to resolve this issue for my own personal gain, to restore my own functionality, I am more concerned about the over-arching issue impacting openkore as a whole. This is either a configuration issue (I do not believe it is as I am on the latest release and my diff from the master branch is minimal) or a bug. Considering it is seemingly random and I cannot find a consistent pattern of failure I am even more convinced it is a bug as static configuration options would presumably lead to a more static experience in symptoms.

Just to appease, I've tested disabling autosell and autostore, and removing my autobuy functions. The issue still persists.

alisonrag commented 7 years ago

Checklos?

koynro commented 7 years ago

I should be able to move at least one direction.

AI set to manual mode
move 145 134
Calculating route to: Payon Town(payon): 145, 134
You on route to: Payon Town(payon): 145, 134
Route You Solution Ready!
Route You - next step moving to (145, 134), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Route You - trimming down solution (2) by 0 steps
Route You - next step moving to (145, 134), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Stuck at payon (145,135), while walking from (145,135) to (145,134).
Stuck during route.
move 145 136
Calculating route to: Payon Town(payon): 145, 136
You on route to: Payon Town(payon): 145, 136
Route You Solution Ready!
Route You - next step moving to (145, 136), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Route You - trimming down solution (2) by 0 steps
Route You - next step moving to (145, 136), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Stuck at payon (145,135), while walking from (145,135) to (145,136).
Stuck during route.
move 144 135
Calculating route to: Payon Town(payon): 144, 135
You on route to: Payon Town(payon): 144, 135
Route You Solution Ready!
Route You - next step moving to (144, 135), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Route You - trimming down solution (2) by 0 steps
Route You - next step moving to (144, 135), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Stuck at payon (145,135), while walking from (145,135) to (144,135).
Stuck during route.
move 146 135
Calculating route to: Payon Town(payon): 146, 135
You on route to: Payon Town(payon): 146, 135
Route You Solution Ready!
Route You - next step moving to (146, 135), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Route You - trimming down solution (2) by 0 steps
Route You - next step moving to (146, 135), index 1, 2 steps left
Move You - (re)trying
Move You - (re)trying
Move You - (re)trying
Move You - timeout
Stuck at payon (145,135), while walking from (145,135) to (146,135).
Stuck during route.
c4c1n6kr3m1 commented 7 years ago

lag may be?

server lag may cause stuck while walking .

too many bots? are you downloading something ? streaming ?

alisonrag commented 7 years ago

the problem seems happen just to you, did you try to download the last version? are u using any plugin or macro?

koynro commented 7 years ago

@alisonrag Yes I am on the latest master. Check out the branch I just made, feel free to give it a shot yourself if that will be helpful.

koynro commented 7 years ago

@c4c1n6kr3m1 No it is not a lag issue. The server is active and responsive while failing to resolve a path. This is the single instance of openkore running.

very7unny commented 7 years ago

i have the similar problem with you. I spotted some patterns, will go test it and let you know my findings.

alisonrag commented 7 years ago

continue in #1006