hectorgimenez / koolo

Diablo II Resurrected bot written in Go
MIT License
67 stars 38 forks source link

index out of range #267

Open pampppp opened 1 month ago

pampppp commented 1 month ago

Details

hello, first i want to tank you for the work you did! its awsome! realy good job!

i edit cause i try the dev version and it fix lot of problem but i have one problem staying

the bot crach after x run and dont restart himself i looking for issue here and i find a post for upgrade the memory, i try now if its fix

i need the bot work when i sleeping xD

logs

time=20:45:23 level=INFO msg="Starting Game #2. Run list: countess, tristram" time=20:45:23 level=INFO msg="Running: countess" time=20:45:23 level=DEBUG msg="Checking for character corpse..." time=20:45:23 level=DEBUG msg="Character corpse not found :D" time=20:45:23 level=DEBUG msg="Checking for items to identify..." time=20:45:23 level=INFO msg="Identifying 1 items..." time=20:45:26 level=INFO msg="Visiting vendor..." forceRefill=false time=20:45:27 level=ERROR msg="fatal error detected, forcing shutdown" supervisor=pap error="runtime error: index out of range [0] with length 0" stacktrace="goroutine 3572 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/hectorgimenez/koolo/internal.(SupervisorManager).Start.func2.1()\n\tgithub.com/hectorgimenez/koolo/internal/manager.go:76 +0x108\npanic({0x18a6200?, 0xc0000a8a20?})\n\truntime/panic.go:770 +0x132\ngithub.com/hectorgimenez/d2go/pkg/memory.(GameReader).Inventory(0xc000758808, {0xc0019dc008, 0xa, 0x0?}, {0x0?, 0x1b30bc63998?, 0xc0008e2780?})\n\tgithub.com/hectorgimenez/d2go@v0.0.0-20240522151855-b42823864338/pkg/memory/item.go:99 +0x11e6\ngithub.com/hectorgimenez/d2go/pkg/memory.(GameReader).GetData(_)\n\tgithub.com/hectorgimenez/d2go@v0.0.0-20240522151855-b42823864338/pkg/memory/game_reader.go:52 +0x55d\ngithub.com/hectorgimenez/koolo/internal/game.(MemoryReader).GetData(, )\n\tgithub.com/hectorgimenez/koolo/internal/game/memory_reader.go:65 +0x56\ngithub.com/hectorgimenez/koolo/internal.(Bot).Run(0xc000104100, {0x1b0fa20, 0xc00041a140}, 0x0, {0xc000a86840, 0x2, 0x2})\n\tgithub.com/hectorgimenez/koolo/internal/bot.go:121 +0xc98\ngithub.com/hectorgimenez/koolo/internal.(SinglePlayerSupervisor).Start(0xc000748058)\n\tgithub.com/hectorgimenez/koolo/internal/single_supervisor.go:70 +0x485\ngithub.com/hectorgimenez/koolo/internal.(SupervisorManager).Start.func2()\n\tgithub.com/hectorgimenez/koolo/internal/manager.go:82 +0xa2\ncreated by github.com/hectorgimenez/koolo/internal.(SupervisorManager).Start in goroutine 2760\n\tgithub.com/hectorgimenez/koolo/internal/manager.go:69 +0x21d\n" time=20:45:27 level=INFO msg=Stopping... configuration=pap time=20:45:27 level=ERROR msg="error restoring memory" !BADKEY="Accès refusé." time=20:45:27 level=ERROR msg="error restoring memory" !BADKEY="Accès refusé." time=20:45:27 level=INFO msg="Failed to kill process" configuration=pap time=20:45:27 level=INFO msg="Finished stopping" configuration=pap

AquaRush commented 1 month ago

@pampppp please update to the latest commits and comment out here whether you still experience the same issue.