ilpersi / BHBot

A bot that automates a game called Bit Heroes
GNU General Public License v3.0
28 stars 32 forks source link

Bot detects gauntlet victory before time and does not progress after that #169

Closed JacoboGuijar closed 4 years ago

JacoboGuijar commented 4 years ago

Describe the bug When the bot runs the Gaunlet it starts properly but it shows the victory message before it finish and when it the game ends the las wave it stays in the victory screen forever. I have been reading other issues and it really looks like issue 150 but in this case the bot doesn't exit the victory screen at the end also in the other issue is mentioned that this happened almost 2 out 3 times but in my case it's being happening every time.

The received messages from the bot are: `21:46:31,498 READOUT - Tokens: 1, required: >0, Gauntlet cost: 1

21:46:34,333 INFO - Attempting gauntlet at level 18...

21:46:53,570 INFO - Gauntlet initiated!

21:47:03,172 INFO - Gauntlet #1 completed. Result: Victory

21:47:03,174 STATS - Gauntlet success rate is 100.00% W:1 L:0.

21:47:03,176 STATS - Victory run time: 9s. Average: 9s.

21:47:06,034 WARN - Unable to find close button for Gauntlet victory screen..

21:47:24,036 ERROR - Error: unable to close popup securely: popup cue not detected! `

To Reproduce Steps to reproduce the behavior:

  1. Init file: https://pastebin.com/CKc8Yucr
  2. Enable setting: ✘Disable auto pilot on death ✘Ignore Boss ✘Ignore shrines ✔Show helm ✔Show mount ✘Notifications ✘Friend requests ✘World boss requests ✔Autopilot ✔Auto enrage ✘Reduced effects ✔Battle text ✘Overlay status bars ✔World chat ✔Animations ✘Decline duplicate familiars ✘Decline merchants ✔Decline Treasures ✔Hide level on world chat
  3. Start the bot and wait until it enters the Gauntlet
  4. Wait until it ends and you will then see how it does not progress from that point

Expected behavior Wait until the Gauntlet is over and sees the Victory or Defeat screen and then continue with the programmed activities.

Screenshots https://imgur.com/a/TUlG513

Settings https://pastebin.com/CKc8Yucr

Desktop (please complete the following information):

ilpersi commented 4 years ago

Do you get any crash? If you do in the /screenshot folder you also get a screen of where the game was at when this happened cause the screenshot you pasted is for raid and it looks unrelated.

ilpersi commented 4 years ago

While you look for the info I asked in my previous comment, can you please have a go with this experimental build?

I am not able to reproduce this, so I just tried to guess a possible fix. 😄

You just have to replace the BHBot.jar file with the one provided in the above link.

JacoboGuijar commented 4 years ago

Sorry for uploading the wrong image. I have updated it in the report.

This is the moment it crashes(sorry for not posting it before I did not know about a folder for crashes) and this is what the file(crash_20200624_2.txt) says:

java.base/java.lang.Thread.getStackTrace(Thread.java:1606) com.github.ilpersi.BHBot.Misc.getStackTrace(Misc.java:41) com.github.ilpersi.BHBot.BHBot.dumpCrashLog(BHBot.java:824) com.github.ilpersi.BHBot.BHBot.restart(BHBot.java:846) com.github.ilpersi.BHBot.DungeonThread.restart(DungeonThread.java:251) com.github.ilpersi.BHBot.DungeonThread.restart(DungeonThread.java:243) com.github.ilpersi.BHBot.DungeonThread.run(DungeonThread.java:286) java.base/java.lang.Thread.run(Thread.java:834) Also this are the game and console at the moment the error appears.

Trying it with the experimental build does not generate an error but neither it solves the problem as you can see here: https://imgur.com/a/k70JnOH the only change I saw is that it took 5 seconds to print the victory message instead of the previous 0 seconds but after 15 minutes it keeps still and doesn't change until it disconnects for inactivity.

ilpersi commented 4 years ago

Thank you for the really detailed bug report. This is so strange. It looks like a Bit Heros bug where the victory pop-up is presented even if the Gauntlet is still ongoing...

One more test build for you to try.

JacoboGuijar commented 4 years ago

Well now it repeats the same log on the console but definitely it works. I don not know if you did this on the fly or if you had it prepared for other issues, any way it was really nice of you thanks a lot and I think you can close this thread.

18:53:41,729 INFO - Attempting gauntlet at level 18...
18:54:01,140 INFO - Gauntlet initiated!
18:54:05,126 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:11,486 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:20,753 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:26,001 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:32,499 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:38,414 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:41,939 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:47,276 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:54:50,766 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:02,158 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:07,034 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:10,657 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:17,616 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:21,657 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:27,606 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:32,706 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:43,933 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:50,513 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:55:56,496 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:00,448 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:08,632 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:13,509 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:18,870 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:21,787 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:26,693 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:31,437 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:38,252 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:41,797 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:48,486 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:52,237 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:56:56,063 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:57:03,768 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:57:08,878 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:57:18,328 WARN - Unable to find close button for Gauntlet victory screen. Ignoring it.
18:57:22,981 INFO - Gauntlet #1 completed. Result: Victory
18:57:22,985 STATS - Gauntlet success rate is 100.00% W:1 L:0.
18:57:22,987 STATS - Victory run time: 3m 21s. Average: 3m 21s.
18:57:29,259 READOUT - Tickets: 2, required: >4, PVP cost: 5
ilpersi commented 4 years ago

Yeah, the spam is expected and I will probably remove it. This was an ad hoc fix: as you mentioned other people had similar issues in the past, so fixing this for you will also fix it for them and make BHBot a bit better. 👍

ilpersi commented 4 years ago

@JacoboGuijar if you want the final version without the spam, just download again form the previous links.