Xian55 / WowClassicGrindBot

Highly configurable and responsive World of Warcraft Classic pixel Grind Bot - No DLL injection or memory tampering, just screen capture and input simulation.
177 stars 121 forks source link

Chat/ChatReader arg out of range exception #567

Closed jacobhamblin closed 6 months ago

jacobhamblin commented 8 months ago

Description

Expectation: bot does its thing as configured What happened: lost connection to localhost:5000, prompts to reload

Was just running a simple rotation on some mobs in the barrens

[04:29:39:125 I] [GoapAgent      ] New Plan=  Follow Route
[04:29:39:127 I] [Navigation     ] [LocalPathingApi] distance is close 17.654783. Keep RouteToWaypoint.
[04:29:40:371 I] [NpcNameFinder] type = None | mode = Fuzzy
[04:29:41:555 E] Specified argument was out of the range of valid values. (Parameter 'start')
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'start')
   at Core.ChatReader.Update(IAddonDataProvider reader) in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\Chat\ChatReader.cs:line 43
   at Core.AddonReader.Update() in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\Addon\AddonReader.cs:line 73
   at Core.BotController.AddonThread() in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\BotController.cs:line 152
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'start')
   at Core.ChatReader.Update(IAddonDataProvider reader) in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\Chat\ChatReader.cs:line 43
   at Core.AddonReader.Update() in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\Addon\AddonReader.cs:line 73
   at Core.BotController.AddonThread() in C:\Users\jacob\Downloads\WowClassicGrindBot-devv\WowClassicGrindBot-dev\Core\BotController.cs:line 152
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Addon Version

1,7,52

World of Warcraft Client

Season of Mastery

Reproduction Steps

Don't think it was related to anything I was doing. Could be wrong

Last Good Version

No response

Screenshots

No response

Logs

out20240202_001.log

Xian55 commented 8 months ago

Hello there,

I just did a quick test to check the ChatReader component integrity, it seems working fine.

I have an assumption about that your FrameConfig.json might be invalid thus the backend is unable to read the correct values. As I'm seeing many negative milliseconds(ms) values in the logs, which means the the designed await times are timed out. In other words it does not work as intended. example from the logs:

[03:40:41:551 I] [GoapAgent      ] New Plan=  Combat
[03:40:44:047 I] [Haunt          ] instant usable: True->False | current: False->False | CAST_SUCCESS->CAST_SUCCESS
[03:40:45:345 I] [Haunt          ] instant input 63ms SPELL_FAILED_NOT_READY -1233.5497ms
[03:40:46:587 I] [Curse of Agony ] instant input 59ms CAST_SUCCESS -1181.5092ms
[03:40:47:851 I] [Curse of Agony ] instant usable: False->False | current: False->False | CAST_SUCCESS->CAST_SUCCESS
[03:40:50:365 I] [Shoot          ] instant usable: True->False | current: False->True | CAST_SUCCESS->CAST_SUCCESS
[03:40:51:631 I] [Shoot          ] instant input 89ms CAST_SUCCESS -1174.0035ms
[03:40:53:780 I] [GoapAgent      ] Kill credit detected! Known kills: 1 | Fighting with: 0
[03:40:54:095 I] [Shoot          ] instant usable: True->False | current: False->False | CAST_SUCCESS->CAST_SUCCESS
[03:40:55:331 I] [Shoot          ] instant input 61ms SPELL_FAILED_NOT_READY -1172.261ms
[03:40:55:332 I] [CombatGoal     ] Lost target!

I recommend to delete the FrameConfig.json next to the executable and run the BlazorServer to regenerate the config file again. Also after successfully creating the FrameConfig.json file be sure to do a quick validation to check everything's in order.

You can trigger this exception again by sending a say message or whispering yourself.

If the issue still persist i may recommend the followings:

You may have to do the FrameConfig.json delete and recreation multiple times.

jacobhamblin commented 8 months ago

Will test, thanks

Xian55 commented 7 months ago

Gooday!