Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mac] Mulligan guide keeps getting stuck #1340

Closed
1 of 10 tasks
KDederichs opened this issue Mar 16, 2024 · 22 comments
Closed
1 of 10 tasks

[Mac] Mulligan guide keeps getting stuck #1340

KDederichs opened this issue Mar 16, 2024 · 22 comments

Comments

@KDederichs
Copy link

Describe the bug
In like 3 out of 4 games the mulligan guide doesn't go away after the game starts. You have to close HSTracker and reopen it for it to be fixed.

To Reproduce
Steps to reproduce the behavior:
Just play games with it, happens all the time

Game mode

  • Standard
  • Wild
  • Classic
  • Arena
  • Battlegrounds
  • Duels
  • Mercenaries
  • Tavern Brawl
  • Dungeon Run/Book of Heroes/Book of Mercenaries
  • Single Player

Expected behavior
It doesn't get stuck

Screenshots
Screenshot 2024-03-16 at 09 30 28

Version (please complete the following information):
2.6.10

Additional context
Add any other context about the problem here.

Log file
Attach the hstracker.log file found under /Users/<userid>/Library/Logs/HSTracker/ directory (or use the Help->Open log directory)
hstracker.log

@fmoraes74
Copy link
Contributor

Did you play another mode before the issue started to happen?

@MrLyle
Copy link

MrLyle commented Mar 16, 2024

While we're on the mulligan overlay. Can someone explain what these are supposed to do? They're not clickable and I'm not sure what their purpose is. They overlay on top of deck slots and they feel like they should be clickable. There are also only 6 of them and not 9. I tried to disable them but then the overlay at the beginning of the game doesn't show up and that feature is pretty damn useful.

Screen Shot 2024-03-16 at 12 52 20 PM

@KDederichs
Copy link
Author

No, I literally start the HSTracker, then the game and head to standard and it happens more often than not.

@TyphoonFL
Copy link

Same issue for me, tracker can be manually hidden by clicking the hide button, but if you don't do this the overlay never disappears otherwise, even after the mulligan is completed

@fmoraes74
Copy link
Contributor

While we're on the mulligan overlay. Can someone explain what these are supposed to do? They're not clickable and I'm not sure what their purpose is. They overlay on top of deck slots and they feel like they should be clickable. There are also only 6 of them and not 9. I tried to disable them but then the overlay at the beginning of the game doesn't show up and that feature is pretty damn useful.

Screen Shot 2024-03-16 at 12 52 20 PM

Those indicate which decks have mulligan guide available. If you hover over a deck, it show the status on the box.

@ShereKahn
Copy link

ShereKahn commented Mar 17, 2024

Same issue here, only play standard hearthstone.

Super useful feature, so glad the improvement was made, although I would still like to be presented the old button to open the mulligan guide on HSReplay as before.

As well the game upload seems not to be happening when the game ends in the stuck condition.

Thanks for keeping up the good work!

@MrLyle
Copy link

MrLyle commented Mar 17, 2024

Those indicate which decks have mulligan guide available. If you hover over a deck, it show the status on the box.

I understand. Shouldn't there be 3 more for the decks on the right side?

@fmoraes74
Copy link
Contributor

Those indicate which decks have mulligan guide available. If you hover over a deck, it show the status on the box.

I understand. Shouldn't there be 3 more for the decks on the right side?

In theory, yes. Do the right box highlights when you hover the deck slot or is it incorrectly placed? If the deck is not valid for the game mode, it won't have a box in that view but it seems to be enabled. I would have to look at the log showing the request/response to that page and see what happened..

As for the original issue, it would be great to know what sequence leads to the overlay getting stuck. I played a few games yesterday and didn't see a problem yet. I will get the code for the traditional mulligan toast in that path as well as I skipped it.

@KDederichs
Copy link
Author

I mean I can't really tell you anything apart from "I start the game and it immediately gets stuck".

Maybe it's a setup thing?

I got an 2019 iMac 5k (with Intel CPU still) and 2 extra screens connected to an eGPU.

Apart from that there really is no sequence of things, it just does it.

Is there some sort of debug mode with enhanced logging I could enable or something like that?

@fmoraes74
Copy link
Contributor

There is no additional debugging that would help here. You can attach your hstracker.log and note the time when it was stuck in the comment. I haven't seen anything that explains this bug yet.

@KDederichs
Copy link
Author

KDederichs commented Mar 18, 2024

Sure here's a complete log, 1 game start to finish (I literally opened HSTracker and Hearthstone, played one game where it immediately happened and then closed it after the game was done):
hstracker.log

Mulligan ends at around 22:19:30 -ish but there's no log there corresponding to that as far as I can tell.

In general there isn't much logging of the game going on as far as I can see, the duration of the game (was a short one, about 2 or 3 minutes) seems to be a complete void (22:20 - 22:23).

Edit:
Looking at the code, a bit it might be stuck in there:

for _ in 0..<16*60*60 { // 2 minutes
if isInMenu || (gameEntity?[.step] ?? 0) > Step.begin_mulligan.rawValue {
DispatchQueue.main.async {
self.hideMulliganGuideStats()
}
player.mulliganCardStats = nil
return
}
if (playerEntity?[.mulligan_state] ?? 0) >= Mulligan.done.rawValue && (opponentEntity?[.mulligan_state] ?? 0) >= Mulligan.done.rawValue {
break
}
Thread.sleep(forTimeInterval: 0.016)
}
DispatchQueue.main.async {
self.hideMulliganGuideStats()
}
player.mulliganCardStats = nil
}
}
}

playerEntity?[.mulligan_state] ?? 0 not updating correctly maybe?
I did notice you have a isMulliganDone() method that actually always seems to look at the entity map which is not used here for some reason.

Maybe I'll try playing around with it tomorrow if it's not too much of a pain to compile myself.

@ShereKahn
Copy link

Adding my logs from yesteday:
hstracker.log

In my case (starting from the bottom) you can seen that I had HSTRacker still running, then entered HS:
15:00:02.443 VERBOSE CoreManager.appLaunched():358 - Hearthstone is now launched

I played 4 games in a row, Warlock, then DK, then Warrior. and back to DK. on the 4th game the mulligan seems to have appeared ok, but sill had "keep rate" overlay up :
Screenshot 2024-03-18 at 15 37 40

I see:
15:01:33.138 INFO Game.gameStart():1670 - ----- Game Started -----

but no further logs for that game. at

15:09:09.676 DEBUG Game.experienceChangedAsync():752 - Experience changed. Current mode gameplay, previous tournament
15:09:09.680 DEBUG Game.experienceChangedAsync():757 - Showing experience counter now
15:09:38.752 DEBUG CoreManager.init():95 - Memory Used by App: 234.14MB
15:10:00.320 INFO DeckWatcher.startWatching():22 - Starting DeckPickerWatcher
...
15:10:57.778 INFO DeckWatcher.stopWatching():37 - Stopping DeckPickerWatcher

The game did indeed end, as the XP changed and came back in the deck-picker screen. I immediately started another game tho, this time with DK:
Screenshot 2024-03-18 at 15 13 55

and as you can see the tracker was still showing and stuck on the warlock deck. No logs unfortunately until game clearly ends:

15:18:10.906 DEBUG Game.experienceChangedAsync():752 - Experience changed. Current mode gameplay, previous tournament
15:18:10.908 DEBUG Game.experienceChangedAsync():757 - Showing experience counter now
15:18:17.188 DEBUG ConstructedMulliganGuide.update():94 - update(_:) - property statsVisibility
15:18:17.451 DEBUG ConstructedMulliganGuide.update():94 - update(_:) - property statsVisibility
15:18:17.888 DEBUG ConstructedMulliganGuide.update():94 - update(_:) - property statsVisibility
15:18:18.092 DEBUG ConstructedMulliganGuide.update():94 - update(_:) - property statsVisibility
15:18:44.986 INFO DeckWatcher.startWatching():22 - Starting DeckPickerWatcher

played another game with Warrior (which has no mullingans on HSReplay as it has a couple of tech)

and later on hs tracker picked up the states startinng with :

5:19:46.606 INFO Game.win():2176 - You win ¯\_(ツ) _ / ¯
15:19:46.611 INFO Game.gameEnd():1753 - ----- Game End -----
15:19:46.613 VERBOSE Game.handleEndGame():1900 - currentGameStats: playerHero: warlock, opponentHero: paladin, coin: true, gameMode: ranked, result: win, turns: 9, startTime: 2024-03-18 14:01:33 +0000, endTime: 2024-03-18 14:19:46 +0000, note: , playerName: ShereKahn#2704, opponentName: Xersize#2202, wasConceded: false, hearthstoneBuild: Optional(0), playerCardbackId: 0, opponentCardbackId: 0, friendlyPlayerId: 2, scenarioId: 2, serverInfo: Optional(ServerInfo {

Here the logs seems to show HSTracker is continuing to read the rest of the games, but I'm not sure.

If I would venture a guess, I am assuming that something is blocking the read of the files (possibly while waiting the mulligans from the REST api?)

I hope this helps a bit, let me know if you need more info,

Thanks

@ShereKahn
Copy link

ShereKahn commented Mar 19, 2024

And just mentioning this in passing, sometimes the deck detection fails and the tracker is still on the previous deck I played, but this particular behaviour is not new, and I have never really bothered to look into, but it might be exacerbating the issue on this thread.

@fmoraes74
Copy link
Contributor

@ShereKahn Seems like you may be up to something with the code being stuck. Would you be able to recreate the issue and when the overlay is stuck, use the Activity Monitor application, find HSTracker on the list, click on the little i, find the Sample button and once that's generated, attach it here? That would help me understand where the problem is happening and hopefully fix the issue.

@KDederichs
Copy link
Author

Sample of HSTracker.txt
Here's one from me for now with it being stuck

@fmoraes74
Copy link
Contributor

Does it work if you stop HSTracker, go to ~/Library/Application\ Support/HSTracker/ and rename hstracker.realm ? Just wondering if this could be causing issues, just want to confirm.

@KDederichs
Copy link
Author

Nope, still sticking around

@KDederichs
Copy link
Author

If it helps, if you keep it open for the whole game, it also keeps open in the game menu
Screenshot 2024-03-19 at 23 11 14

@fmoraes74
Copy link
Contributor

Let me know if the latest version improved things.

@MrLyle
Copy link

MrLyle commented Mar 20, 2024

Been using it for about an hour and it seems stable now. The mulligan guide overlay still doesn't show up on the right row of decks. Only on the left row and the middle row, but the actual overlay when the game starts shows up and disappears correctly after the mulligan phase. I haven't seen it get stuck yet since the update. Definitely much better.

@KDederichs
Copy link
Author

Seems fixed, played like 3 hours and didn't get stuck once, thanks a lot!

@fmoraes74
Copy link
Contributor

Been using it for about an hour and it seems stable now. The mulligan guide overlay still doesn't show up on the right row of decks. Only on the left row and the middle row, but the actual overlay when the game starts shows up and disappears correctly after the mulligan phase. I haven't seen it get stuck yet since the update. Definitely much better.

@MrLyle Please have the issue with the pre game overlay happen again and then attach a log file before entereing a game. You can also switch to another application like a browser and then back to Hearthstone before attaching the log. Does the overlay position correctly after switching to another application?

What's your resolution? Playing on the main monitor or secondary ? Full screen or windowed? Please open a separate issue for that, I want to get to the bottom of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants