Sometimes windows do not show up in-game

Issue Description:
Running into some huge issue here. The new HearthArena client has ton of windows, however every now and then a single window (rarely more) don’t show up (I am not sure if this is an issue bound to Hearthstone). By now I’ve had this happen which pretty much any in-game window. I see the not-shown windows in localhost:54284 , i can even go into that window’s devtools and call getCurrentWindow and retrieve the ‘expected’ result as if it is being shown (size/position/state are all correct).

I tried hiding, minimizing, restoring, obtaining, resizing, repositioning, bringToFront etc but nothing seems to be bring the window in-game expect for completely closing the window (using overwolf.windows.close() and obtaining/restoring). Note: I also tried thinks like giving the windows a red background etc. to see if it is CSS that prevents the windows from showing.

The issue seems to happen in about 1/20th of the cases for me where at least one window doesn’t end up showing.

Although I am not 100% on this, I think I even experienced a window “A” showing up in window’s “B” position, while window “B” was no where to be seen.

Steps to reproduce:
Until I have a client to test which is not bound to my local dev this will be hard to reproduce on another system.

Do you currently have a workaround?
Until I find out what is going wrong, no.

The issue might be that internally in OW window API there are some issues when you are obtaining or restoring multiple windows simultaneously. For example, when one uses obtainDeclaredWindow() a second time before the first obtainDeclaredWindow callback is triggered.

Maybe some internal variables are overwritten or shared while they shouldn’t be?

Impact of this issue on the app
Huge

Workaround:
Currently trying to figure out what exactly makes this happen. When I overwolf.windows.close() and obtain/restore windows this seems to happen in 1/20th of the time but in all my use-cases I am triggering multiple obtain/restore API calls in parallel. So instead of

overwolf.obtainDeclaredWindow(A)
overwolf.obtainDeclaredWindow of A is returned
overwolf.obtainDeclaredWindow(B)
overwolf.obtainDeclaredWindow of B is returned

things might go

overwolf.obtainDeclaredWindow(A)
overwolf.obtainDeclaredWindow(B)
overwolf.obtainDeclaredWindow of A is returned
overwolf.obtainDeclaredWindow of B is returned

So did some more tests as requested by @tom.wolf.

I made the windows hybrid aka “normal” windows instead of “in-game-only”. I also activated the taskbar.

It seems that whenever a window doesnt appear in-game, they DO show up in the taskbar AND when switched to the desktop. Once you get back into the game, they don’t show.

@heartharena

  1. Can you please upload your OW logs here once this issue is reproduced?
  2. Can you send us your app + steps to reproduce this bug?

So I created an alpha OPK and put in slack #heartharena_channel. To see this problem in action. Go into an arena draft where you would see the scores show up.

Now exit the app (by going to the X in the HearthArena dock window), and restart the app (from the OW dock). When the app reboots it should show you 3 windows:

  • The heartharena dock (this should say “choose between card A,B or C”)
  • The bubble window (the top text box)
  • The scores window (the scores & synergies below each card)

Exit and re-open the app until any of the 3 windows does not shop up. For me this happends anywhere between 1-20 tries.

Thanks, we’ll try to reproduce and fix this bug. (we’ll update you once a fix is ready)

@heartharena it would be difficult for us to reproduce this bug on many arena drafts, can you please send us a new version that includes this flow but without actually having to start a real draft?

You only need to be in a single arena draft.

You do not have to cancel the draft in between your tries.
You do not have to actually pick cards in between tries.

You should just exit the HearthArena app and re-open it while at any pick during your draft.

Hey Jeremy,

Do you have some alternative way to reproduce this? I’ve tried probably at least around 30-40 times with the way you described here but with no success. All the windows open up for me every single time.

So today I checked again in dev and production and the issue is gone in my latest version. It seems I worked around the issue somehow.

I then tried the code of last week, and the issue is still there (after a couple close/open calls a window doesn’t show up).

In the #heartharena channel on slack I uploaded an OPK called 1.9, this boots up the “old code” of last week. Testing with that version should replicate the issue.

Additionally, I added logs for when it happened to me. The logs are promising in a way that they show the issue:

In Trace_2020-11-18_15-03_33172.log, you can see that the scores.html is created:
2020-11-19 13:15:36,259 (INFO) [27] WebBrowser - Create browser host: overwolf-extension://eldaohcjmecjpkpdhhoiolhhaeapcldppbdgbnbc/scores.html (accelerated:False direct:False hardware acceleration:False)
2020-11-19 13:15:36,283 (INFO) [UI] CommonWindowsManager - Showing window ‘Window_Extension_eldaohcjmecjpkpdhhoiolhhaeapcldppbdgbnbc_scores’ at (377, 572, 1102, 486)
2020-11-19 13:15:36,307 (INFO) [UI] WebBrowser - Mute browser view after created overwolf-extension://eldaohcjmecjpkpdhhoiolhhaeapcldppbdgbnbc/bubble.html
2020-11-19 13:15:36,309 (INFO) [UI] WebBrowser - Mute browser view after created overwolf-extension://eldaohcjmecjpkpdhhoiolhhaeapcldppbdgbnbc/scores.html

However in Hearthstone_11-19-20_11-53-22.Game.html you do not see the following for that particular try (whereas it does when things work normnally):
RenderImageD3d11::setSize: Create Texture (1102,486) / (1152,512) - OK
RenderImageD3d11::setSize: Create Texture RV (1152,512) - OK

(you do see Create Texture for the other two windows).

Hi, currently due to the fact that we couldn’t reproduce this issue on both versions, With your permissiomn, I will move ahead and close it. If there will be more details, updates, etc. - we will reopen it of course.

Thanks.

@eransharv Were the logs looked at in @heartharena channel and my description on how you can see the issue is present?