Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BUG: 5.3.1: Bot hang/ blank windows
For those with this problem, please be more specific with how and when the problem occur?

How does the so called memory problem occur that cause the hang?
Coding problem?
Any way to clear the memory cache of the bot?
If we make a stop and start of the bot without closing the process, will the memory cache be cleared?
How about close bot process and restart, will it solve the memory problem?
Also specify what the last thing the bot does, check the log.
I have checked all my logs and found the same lines in the log everytime when the GUI froze.

This "freezing" is not a real freeze like "nothing works anymore" its more a "GUI goes blank and the bot doesn't work properly"

This is what always happens after some time (1-3 hours I guess)

2015-01-03 23:57:52 : Cannot locate Next button, Restarting Bot
2015-01-03 23:57:52 : Trying to get to main screen
2015-01-04 00:02:59 : Could not automatically load Clash Of Clans
2015-01-04 00:03:00 : Restarting BlueStacks
2015-01-04 00:03:10 : Trying to get to main screen
2015-01-04 00:08:17 : Could not automatically load Clash Of Clans
2015-01-04 00:08:18 : Restarting BlueStacks
2015-01-04 00:08:38 : Trying to get to main screen
2015-01-04 00:13:45 : Could not automatically load Clash Of Clans
2015-01-04 00:13:46 : Restarting BlueStacks
2015-01-04 00:13:57 : Trying to get to main screen
2015-01-04 00:19:04 : Could not automatically load Clash Of Clans
2015-01-04 00:19:05 : Restarting BlueStacks....
.... and so on

What is interesting:
It always happens after the

"Cannot locate Next button, Restarting Bot"

Most of the time, when the Next Button cannot be located, it just keeps running fine.

So the question is, whether this is just the effect of the frozen GUI or whether the GUI freezes because of it?

The road so far...


What I almost forgot to mention:
When the bot tries to restart bluestacks, it DOES restart but it stays zoomed in. Could it be, that the bot doesn't zoom out properly sometimes? Just random guessing here...
In the script replace the function checkMainScreen() to:

    AUTOIT Programming
  1.   Func checkMainScreen() ;Checks if in main screen
  2.  _CaptureRegion()
  3.  If _ColorCheckVariation(_PixelGetColor_GetPixel(284, 28), Hex(0x41B1CD, 6), 20) = False Then
  4. _CaptureRegion()
  5. SetLog("Trying to get to main screen")
  6. If _ColorCheckVariation(_PixelGetColor_GetPixel(458, 311), Hex(0x33B5E5, 6), 20) Then ;Check for out of sync or inactivity
  7.   Click(416, 399)
  8.   WinActive("BlueStacks App Player")
  9.   Click(126, 700)
  11.   Local $RunApp = StringReplace(_WinAPI_GetProcessFileName(WinGetProcess("BlueStacks App Player")), "Frontend", "RunApp")
  12.   Run($RunApp & " Android com.supercell.clashofclans com.supercell.clashofclans.GameApp")
  14. If _Sleep(5000) or $RunState = False Then ExitLoop
  16. Local $counter = 0
  18.   If _Sleep(2000) or $RunState = False Then ExitLoop(2)
  19.   If WinExists("BlueStacks App Player") Then
  20.  _CaptureRegion()
  21.  If _ColorCheckVariation(_PixelGetColor_GetPixel(235, 209), Hex(0x9E3826, 6), 20) Then Click(429, 493);See if village was attacked, clicks Okay
  23.  If _ColorCheckVariation(_PixelGetColor_GetPixel(284, 28), Hex(0x215B69, 6), 20) Then Click(1, 1) ;Click away If things are open
  25.  If _ColorCheckVariation(_PixelGetColor_GetPixel(819, 55), Hex(0xD80400, 6), 20) Then Click(819, 55) ;Clicks X
  27.  If _ColorCheckVariation(_PixelGetColor_GetPixel(331, 330), Hex(0xF0A03B, 6), 20) Then Click(331, 330) ;Clicks chat thing
  29.  If _ColorCheckVariation(_PixelGetColor_GetPixel(284, 28), Hex(0x41B1CD, 6), 20) Then ;In main screen
  30.   EndIf
  31.   $counter += 1
  33.   If $counter >= 150 Then ;Five minutes
  34.  SetLog("Could not automatically load Clash Of Clans")
  35.  If _Sleep(1000) or $RunState = False Then ExitLoop(2)
  36.  SetLog("Restarting BlueStacks")
  37.  WinActive("BlueStacks App Player")
  39.  Local $RunApp = StringReplace(_WinAPI_GetProcessFileName(WinGetProcess("BlueStacks App Player")), "Frontend", "RunApp")
  40.  ProcessClose("HD-Frontend.exe")
  41.  If _Sleep(5000) or $RunState = False Then ExitLoop(2)
  42.  Run($RunApp & " Android com.supercell.clashofclans com.supercell.clashofclans.GameApp")
  44.  Do
  45. If _Sleep(10000) or $RunState = False Then ExitLoop(2)
  46.  Until ControlGetHandle("BlueStacks App Player", "", "BlueStacksApp1") <> 0
  48.  checkMainScreen()
  49.  ExitLoop(2)
  50.   EndIf

Previously we thought could be the imagesearch but I have the same situation as you.. Loop in can't find bluestacks. But this was previous version of the bot.

I still haven't really tested this 5.3.1 yet.. Running for an hour now on dead base... Still running strong... Let's see....

By the way, it seems that there is less or no out of sync error with this version...

My pc on 6gb ram, win 7 x64 and on latest version bluestack rooted.
this happens to me to. im using the compiled 32bit by crazies because it has drop king and queen feature which i really need ..
Please use antidote version.. It includes king attack... Test it and report bug... If the bug is of different nature, please start a thread...

Tried to use your version but it gives me an error:

"C:\Users\Cocsi\AppData\Local\Temp\Rar$DIa0.215\COC Bot v5.3.1 (exp).au3"(570,19) : error: _CaptureRegion(): undefined function.

Instead of _CaptureRegion() in the script there is getBSPos()

Shall I just change _CaptureRegion() to getBSPos() ??

Or was this your attempt to solve the issue?
@Cocsi Nevermind, I forgot that _CaptureRegion is new function that I just made for the background thing haha. Also I completely remove getBSpos() next update because of the changes.
Haha alright :D
So shall I try to just change _CaptureRegion() to getBSpos() ?
I am not that experienced regarding auto it.

Forum Jump:

Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.