I used Imagesearch for restarting COC in BS, restarting Bluestacks in 5min counter, identifying main screen and the next button. I made sure my restart functions worked. I also added a lot of logs at the checkmainscreen and getresource. I also deleted the code below at checkmainscreen's 5min counter func as I thought checkmainscreen within checkmainscreen might complicate:
; Do
; If _Sleep(10000) or $RunState = False Then ExitLoop(2)
; Until ControlGetHandle("BlueStacks App Player", "", "BlueStacksApp1") <> 0
; checkMainScreen()
; ExitLoop(2)
The bot was able to restart successfully at first:
.....
2015-01-07 00:58:55 : (66) [G]: 52885 [E]: 9923 [D]: 4 [T]: 11
2015-01-07 00:59:03 : (67) [G]: 41355 [E]: 76252 [D]: 481 [T]: 22
2015-01-07 00:59:08 : (68) [G]: 1537 [E]: 17212 [D]: 118 [T]: 16
2015-01-07 01:04:18 : GETRESOURCES: Cannot Read within 10secs...
2015-01-07 01:04:18 : Cannot locate Next button, Restarting Bot
2015-01-07 01:04:18 : CheckMainScreen: PRoblem Loading...
2015-01-07 01:04:18 : Not in MainScreen. Trying to get to main screen
2015-01-07 01:04:33 : OutofSync: Reload Successful!!!
2015-01-07 01:04:33 : Checking for MainScreen in 7 secs...
2015-01-07 01:04:35 : In MainSCreen! Exiting Loop!
2015-01-07 01:04:35 : GETRESOURCES: Going to MainScreen Successful!!!
2015-01-07 01:04:40 : Training Troops...
2015-01-07 01:04:53 : Training Troops Complete
2015-01-07 01:04:58 : ===============Searching For Base===============
2015-01-07 01:05:01 : (1) [G]: 31135 [E]: 47783 [D]: 548 [T]: 22
2015-01-07 01:05:06 : (2) [G]: 352930 [E]: 357180 [D]: 1243 [T]: 28
2015-01-07 01:05:09 : ~~~~~~~Dead Base Found!~~~~~~~
2015-01-07 01:05:09 : ===============Searching Complete===============
It managed to finish that next attack.
I didn't get a Gui blank screen at the end but the problem still persisted. It wasn't able to get to checknextbutton and checkmainscreen and not triggered any error logs where it should have. The last resource read I got was from the previous search. The hang without blank Gui happened at the next round of search before it was able to read resources and before it was able to trigger any error logs:
2015-01-07 01:13:53 : (41) [G]: 52309 [E]: 76335 [D]: 687 [T]: 14
2015-01-07 01:13:57 : (42) [G]: 24528 [E]: 63260 [D]: 19 [T]: 16
2015-01-07 01:14:03 : (43) [G]: 88617 [E]: 12711 [D]: 152 [T]: 23
2015-01-07 01:14:07 : (44) [G]: 32592 [E]: 33456 [D]: 337 [T]: 12
So I thought of the second while condition:
IMPORT3
But then I remember bot 003 still do hang WITH zombiesearch but I haven't tested without it. The readvalue func doesn't have that that same waiting loop and it still experienced gui blank hang.
I'm so bugged by the problem LOL. Right now I'm also thinking It might still be related to imagesearch/memory.
My big question is, does Madalilng's advanced deadbase search and COC app optimization still experience the same problem?
@Antidote
Did your fix worked?