WineHQ
Bug Tracking Database – Bug 36216

 Bugzilla

 

Last modified: 2015-05-01 07:54:05 CDT  

Hearthstone fails to start, says the game timed out

Bug 36216 - Hearthstone fails to start, says the game timed out
Hearthstone fails to start, says the game timed out
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: shell32
1.7.17
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
https://us.battle.net/account/downloa...
: download, regression
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2014-05-01 18:55 CDT by Jerome Leclanche
Modified: 2015-05-01 07:54 CDT (History)
44 users (show)

See Also:
Regression SHA1: 2005be6dc92c0943ede01525cecad88f8e83c9c7
Fixed by SHA1: 4b559f02dd6ad61287fb79547c93105aaa2f7525
Distribution: ---
Staged patchset:


Attachments
WINEDEBUG=+winsock,+tid,-uniscribe wine Hearthstone\ Beta\ Launcher.exe (801.58 KB, text/plain)
2014-05-01 19:04 CDT, Jerome Leclanche
Details
1.7.19 trace of Hearthstone.exe (102.88 KB, text/plain)
2014-05-20 14:39 CDT, Ker noa
Details
patch reverting commit 2005be6dc92c0943ede01525cecad88f8e83c9c7 (947 bytes, patch)
2014-05-20 16:31 CDT, Johannes Dewender
Details | Diff
revert commit shell32 (966 bytes, patch)
2014-07-10 14:43 CDT, yarglesnargle7
Details | Diff
winedebug log with +exec (25.45 KB, text/plain)
2014-08-09 16:47 CDT, Ker noa
Details
winedebug log with +exec when started from the launcher (4.78 KB, text/plain)
2014-08-09 16:48 CDT, Ker noa
Details
patch taken from wine-staging/compholio by Erich E. Hoover (8.35 KB, patch)
2015-02-24 12:54 CST, Johannes Dewender
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Leclanche 2014-05-01 18:55:55 CDT
(not related to bug 36178)

The game is started from the Battle.net client, gets to the login screen. Then the game says:

Closed
Your game timed out as it was requesting data from the Hearthstone utility service. Please relaunch Hearthstone to reconnect.


This error sometimes happened before, but now it's impossible to get into the game. Looking at some wireshark logs, theres a lot of crypted communication on port 1119 between hearthstone and the battle.net agent, then it stops for a few seconds and the game says it timed out.
Comment 1 Jerome Leclanche 2014-05-01 19:04:40 CDT
Created attachment 48348 [details]
WINEDEBUG=+winsock,+tid,-uniscribe wine Hearthstone\ Beta\ Launcher.exe

Here is a winsock,tid log. Server killed immediately after timeout. (-uniscribe because of fixme:uniscribe:ScriptShapeOpenType Ranges not supported yet spam)
Comment 2 Matteo Bruni 2014-05-02 15:23:11 CDT
I ran a regression test and weirdly (for me at least) the culprit seems to be:

commit 2005be6dc92c0943ede01525cecad88f8e83c9c7
Author: Vincent Povirk <vincent@codeweavers.com>
Date:   Wed Apr 16 15:50:37 2014 -0500

    shell32: Use CREATE_NEW_CONSOLE when SEE_MASK_NOCONSOLE is omitted.

Reverting it on top of wine 1.7.18 fixes the issue here. Jerome, can you confirm? I guess a +tid,+exec,+process trace might shed some light.
Comment 3 Jerome Leclanche 2014-05-02 15:26:55 CDT
Interesting. I will give it a shot in a bit, I really didn't think it'd be a regression.
Comment 4 Vincent Povirk 2014-05-02 15:45:51 CDT
I haven't had a chance to try reverting the patch, but I can reproduce the bug here.
Comment 5 Jerome Leclanche 2014-05-02 15:48:09 CDT
(In reply to Vincent Povirk from comment #4)
I'm currently unable to reproduce the bug, so I can't test reverting it.
Comment 6 Vincent Povirk 2014-05-02 16:24:30 CDT
Reverting the patch helps here as well.
Comment 7 Vincent Povirk 2014-05-02 16:37:20 CDT
I think what's breaking this is the delay in starting Agent.exe (which is a console executable) when we also start wineconsole.exe. Using DETACHED_PROCESS doesn't break it like CREATE_NEW_CONSOLE does, so I don't think it matters what happens to the stdio handles.
Comment 8 Xinkai 2014-05-03 05:22:55 CDT
(In reply to Matteo Bruni from comment #2)
> I ran a regression test and weirdly (for me at least) the culprit seems to
> be:
> 
> commit 2005be6dc92c0943ede01525cecad88f8e83c9c7
> Author: Vincent Povirk <vincent@codeweavers.com>
> Date:   Wed Apr 16 15:50:37 2014 -0500
> 
>     shell32: Use CREATE_NEW_CONSOLE when SEE_MASK_NOCONSOLE is omitted.
> 
> Reverting it on top of wine 1.7.18 fixes the issue here. Jerome, can you
> confirm? I guess a +tid,+exec,+process trace might shed some light.

Thanks, reverting this works for me as well.
Comment 9 Vincent Povirk 2014-05-05 11:56:34 CDT
Well, I'm stumped. Agent.exe is started before Hearthstone, so I assume it's not related to startup timing, and I don't know what else it could be.
Comment 10 Vijay Kamuju 2014-05-05 12:02:39 CDT
Can you send a patch to fix the spamming of FIXME's in usp10.
Comment 11 Ozan Türkyılmaz 2014-05-06 13:16:22 CDT
I reve(In reply to Matteo Bruni from comment #2)
> I ran a regression test and weirdly (for me at least) the culprit seems to
> be:
> 
> commit 2005be6dc92c0943ede01525cecad88f8e83c9c7
> Author: Vincent Povirk <vincent@codeweavers.com>
> Date:   Wed Apr 16 15:50:37 2014 -0500
> 
>     shell32: Use CREATE_NEW_CONSOLE when SEE_MASK_NOCONSOLE is omitted.
> 
> Reverting it on top of wine 1.7.18 fixes the issue here. Jerome, can you
> confirm? I guess a +tid,+exec,+process trace might shed some light.

I reverted and game connected just fine.
Comment 12 nE0sIghT 2014-05-08 14:08:00 CDT
I confirm that reverting patch works well
Comment 13 lubosz 2014-05-10 15:51:07 CDT
I can confirm that the said patch causes a regression for Hearthstone.
Reverting it makes Hearthstone playable again.

Please revert it for the next release.

Related battle.net forums post:
http://us.battle.net/hearthstone/en/forum/topic/12673258426
Comment 14 Peter 2014-05-14 14:37:55 CDT
(In reply to Ozan Türkyılmaz from comment #11)
> I reve(In reply to Matteo Bruni from comment #2)
> > I ran a regression test and weirdly (for me at least) the culprit seems to
> > be:
> > 
> > commit 2005be6dc92c0943ede01525cecad88f8e83c9c7
> > Author: Vincent Povirk <vincent@codeweavers.com>
> > Date:   Wed Apr 16 15:50:37 2014 -0500
> > 
> >     shell32: Use CREATE_NEW_CONSOLE when SEE_MASK_NOCONSOLE is omitted.
> > 
> > Reverting it on top of wine 1.7.18 fixes the issue here. Jerome, can you
> > confirm? I guess a +tid,+exec,+process trace might shed some light.
> 
> I reverted and game connected just fine.

I didn't understand is this command or what? Where should I type it?
Comment 15 FakeName 2014-05-17 23:56:20 CDT
(In reply to lubosz from comment #13)
> I can confirm that the said patch causes a regression for Hearthstone.
> Reverting it makes Hearthstone playable again.
> 
> Please revert it for the next release.
> 
> Related battle.net forums post:
> http://us.battle.net/hearthstone/en/forum/topic/12673258426

Sadly they didn't fix it, the problem is still present on wine 1.7.19, I hope they get it fixed for the next release...
Comment 16 Ker noa 2014-05-20 14:39:40 CDT
Created attachment 48573 [details]
1.7.19 trace of Hearthstone.exe
Comment 17 Johannes Dewender 2014-05-20 16:31:56 CDT
Created attachment 48575 [details]
patch reverting commit 2005be6dc92c0943ede01525cecad88f8e83c9c7

I can confirm the problem and the fix for current git (704d169; 1.7.19 + 47 commits).

Without the patch I get that error message starting hearthstone (from battle.net app, login there works).
Applying the patch (reverting commit 2005be6) lets me play hearthstone fine again. (played a full match)

I attach the patch that can be applied to revert the "offending" commit.
(For people not having/using a git checkout)
Comment 18 maxpotter0 2014-06-21 09:10:03 CDT
(In reply to Johannes Dewender from comment #17)
> Created attachment 48575 [details]
> patch reverting commit 2005be6dc92c0943ede01525cecad88f8e83c9c7
> 
> I can confirm the problem and the fix for current git (704d169; 1.7.19 + 47
> commits).
> 
> Without the patch I get that error message starting hearthstone (from
> battle.net app, login there works).
> Applying the patch (reverting commit 2005be6) lets me play hearthstone fine
> again. (played a full match)
> 
> I attach the patch that can be applied to revert the "offending" commit.
> (For people not having/using a git checkout)

How do I download and apply this patch? I've never had to do this before. Thanks for making the patch.
Comment 19 Johannes Dewender 2014-06-21 16:52:30 CDT
Well, this is a bit out of scope for this ticket, but you need to build wine from source like explained a bit here:
https://www.winehq.org/docs/wineusr-guide/installing-wine-source
Depending on your Linux distribution there might be prepared source packages you can build (but that is really out of scope, you better ask in help channels for your distribution). If you are using Ubuntu, there is a dedicated wiki page for that: http://wiki.winehq.org/Ubuntu

Anyways, before you run "make" you do "patch -p1 < shlexec.patch".
Please use other help channels (like for your distribution) if you need more assistance with that. There are 21 CCs for this bug and most probably don't want a dozen messages on how to patch and build wine in one specific distribution.
Comment 20 Jarrod Meyer 2014-06-25 07:05:26 CDT
 Johannes Dewender wrote:
> I can confirm the problem and the fix for current git (704d169; 1.7.19 + 47 commits).

I've installed wine-1.7.20 in fedora 20 from the updates-testing repo, and I can confirm I am still seeing the problem.

Is this not supposed to be fixed before 1.7.20? Maybe I'm missing something.
Comment 21 Ryan Davis 2014-06-26 10:31:54 CDT
Confirm, still present in 1.7.20 packages from Ubuntu 14.04 PPA. I havn't had a chance to set up a proper build environment yet so testing the reversion patch isn't simple for me.
Comment 22 Jerome Leclanche 2014-06-26 10:34:31 CDT
Guys, you don't need to confirm this. The bug is known, the cause is known and reverting 2005be6dc92c0943ede01525cecad88f8e83c9c7 fixes it.

A proper fix is needed to land upstream as it doesn't look like the patch will be reverted (something which could be argued but probably not worth doing so).

If you don't know how git works or how to compile Wine, then please, just stick to Wine 1.7.16 and you won't have this issue.
Comment 23 Jarrod Meyer 2014-06-27 04:01:08 CDT
 Jerome Leclanche wrote:
> Guys, you don't need to confirm this. The bug is known, the cause is known and reverting 2005be6dc92c0943ede01525cecad88f8e83c9c7 fixes it.

Sorry, I thought the comment about it being fixed meant 1.7.20 was unaffected, so I wanted to share the info.
Comment 24 gonzo 2014-07-01 00:42:51 CDT
I can confirm, that building the latest git-version of wine (in my case 1.7.20.r158.g8762842-1) and including your patch works fine.
Thank you Johannes Dewender and all the other guys, who keep track of that meanwhile more or less "solved problem".
Comment 25 Ryan Davis 2014-07-01 04:11:52 CDT
I'm sure it does work with the patch. Reverting the regression doesn't really solve the problem since the regression was introduced by some code designed to fix a different problem. So... what we have are two different source programs, each of which has different problems. The folks working on the code are (we are told) trying to come up with something that includes the new feature and lacks the bug. That patch will then be included in a future mainline release. At that point the problem will be solved.

We do have a workaround providing you are willing/able to build from source.
Comment 26 yarglesnargle7 2014-07-10 14:43:44 CDT
Created attachment 48972 [details]
revert commit shell32
Comment 27 Kyle 2014-07-22 16:47:17 CDT
FWIW, the latest wine update for Fedora 20 (1.7.22-1) is still broken.
Comment 28 Erich E. Hoover 2014-08-09 11:13:57 CDT
Could someone provide a WINEDEBUG="+exec" log?  It'd be interesting to see what kind of SHELLEXECUTEINFO the application is passing.
Comment 29 Ker noa 2014-08-09 16:47:05 CDT
Created attachment 49282 [details]
winedebug log with +exec
Comment 30 Ker noa 2014-08-09 16:48:24 CDT
Created attachment 49283 [details]
winedebug log with +exec when started from the launcher

there you go, debug log with +exec trace , game was started from the launcher.
and on the other attachment run directly from the gamedir with wine
Comment 31 lingepumpe 2014-08-13 10:42:29 CDT
Any information on a proper fix that will be added to wine? Situation is rather sad with this forced downgrade or manual wine compilation...
Comment 32 Cyril Roelandt 2014-08-31 12:17:52 CDT
I can also confirm that reverting the specified commit fixes the issue.
Comment 33 Meghan Pietila 2014-11-09 13:11:25 CST
With wine 1.7.30, the attached patch fails with "Aborting due to unexpected upstream changes".  I don't have the knowledge to create a patch file myself, is there anyone out there who can attach a patch that works with the more recent wine?  (Hearthstone still fails to connect with 1.7.30.)
Comment 34 roger 2014-11-09 14:24:15 CST
What's the cause of this problem? Is it upstream (the game) issue, or something to be fixed in wine?
Comment 35 Ryan Davis 2014-11-09 17:44:49 CST
There is, I have gathered, a timing or order of operations issue. It is in WINE to the extent that some difference of the behavior under native Windows exposes an assumption made by the Hearthstone software that other programs do not make. It may be a case of Blizzard using undocumented behavior or exploiting documented behavior in a way that is atypical. The fact that the patch fails to apply indicates someone has done some work in the neighborhood and that a solution is perhaps forthcoming.
Comment 36 a.metaphysical.drama 2014-11-10 04:10:13 CST
Patching works fine for me, i'm using the patch from the comment 26:
https://bugs.winehq.org/attachment.cgi?id=48972&action=diff&context=patch&collapsed=&headers=1&format=raw
Comment 37 Meghan Pietila 2014-11-11 10:42:10 CST
(In reply to Meghan Pietila from comment #33)
> With wine 1.7.30, the attached patch fails with "Aborting due to unexpected
> upstream changes".  I don't have the knowledge to create a patch file
> myself, is there anyone out there who can attach a patch that works with the
> more recent wine?  (Hearthstone still fails to connect with 1.7.30.)

Tried patching again using the git sources instead of the winehq repository sources and ran successfully; was able to launch and run Battle.net and Hearthstone with no issues on Oct 10.  (New problem appeared on Oct 11, but out of scope of this ticket.)

Followed these directions, in case this helps any other users:  http://wiki.winehq.org/Patching
Comment 39 Sebastian Lackner 2015-01-06 05:28:20 CST
(In reply to Ker noa from comment #38)
> https://github.com/wine-compholio/wine-staging/blob/
> ad5dcc97522c2087727075ecfb323de1567486a6/patches/kernel32-Console_Handles/
> 0001-kernel32-Invalid-console-handles-for-new-processes-a.patch
> 
> seems to be the better approach to fix this.

The patch was added just recently and still needs a bit more testing and probably also some more wine tests. But please give it a try and report back if it works. Especially report if you notice that any app breaks with the patch applied.
Comment 40 Johannes Dewender 2015-01-18 11:59:35 CST
(In reply to Ker noa from comment #38)
> https://github.com/wine-compholio/wine-staging/blob/
> ad5dcc97522c2087727075ecfb323de1567486a6/patches/kernel32-Console_Handles/
> 0001-kernel32-Invalid-console-handles-for-new-processes-a.patch

I rebuilt my wine from current git (1.7.34.r74.gcf92569).
With vanilla wine the error message changed since my last report. I don't get the "timed out" message anymore, but after starting Hearthstone from the launcher I get the same message already mentioned in the Hearthstone comments:
The game crashed.
The crash report folder named "2014-12-28_131400" next to game executable.
(well, with the date of today obviously and another pid/time or what that is)

With (only) the above mentioned patch added everything works fine. I can start Hearthstone and played a game till the end. Diablo 3 also doesn't break with the patch. Didn't try other programs.

So the patch seems to work fine.

PS:
I previously used an older wine build with the patch reverting 2005be6dc92. I don't know when the error message changed, but I do guess this is because Hearthstone itself changed.
Comment 41 lubosz 2015-01-20 06:26:33 CST
I can confirm that "kernel32: Invalid console handles for new processes are 0, not INVALID_HANDLE_VALUE." fixes the timeout issue.

I hope that this will get merged soon and Hearthstone gains upstream Wine support after 9 months again.
Comment 42 Johannes Dewender 2015-02-24 12:54:18 CST
Created attachment 50881 [details]
patch taken from wine-staging/compholio by Erich E. Hoover

I added the best currently known patch to the attachments to make finding it easier. I obsoleted the patch that only reverted 2005be6dc92, since that commit was made to fix other things.

What is the current status? Was the patch submitted? It is not applied in wine (git) and I also can't find it in https://source.winehq.org/patches/
Comment 43 Johannes Dewender 2015-02-24 12:58:44 CST
The patch was sent to wine, but there was no reaction. Possibly because it isn't/wasn't known that this fixes a bug:
https://www.winehq.org/pipermail/wine-patches/2015-January/136652.html

I got the info from
https://github.com/wine-compholio/wine-staging/commit/ad5dcc97522c2087727075ecfb323de1567486a6 (where the patch was added to wine-staging)
Comment 44 Sebastian Lackner 2015-02-24 13:01:35 CST
(In reply to Johannes Dewender from comment #43)
> Possibly because it isn't/wasn't known that this fixes a bug:

"""Several applications rely on the TEB value for fresh invalid console
handles to be zero instead of INVALID_HANDLE_VALUE (fixes Bug #36216
and Bug #37914)."""

What was unclear about that? ;) Erich E. Hoover is planning to resubmit the patch soon, they only stay in the patches list for about one month.
Comment 45 Erich E. Hoover 2015-02-24 16:08:33 CST
(In reply to Sebastian Lackner from comment #44)
> ...
> What was unclear about that? ;) Erich E. Hoover is planning to resubmit the
> patch soon, they only stay in the patches list for about one month.

Yeah, it only just dropped off the list (allowing me to resend it).  I'm going to resend it along with a couple other small patches as soon as I can.
Comment 46 Jerome Leclanche 2015-03-07 01:55:58 CST
(In reply to Erich E. Hoover from comment #45)
Any update Erich?
Comment 47 Erich E. Hoover 2015-03-08 17:07:40 CDT
(In reply to Jerome Leclanche from comment #46)
> (In reply to Erich E. Hoover from comment #45)
> Any update Erich?

Yup, made some fixes for some 64-bit warnings in the tests.  I was planning on submitting Friday but some things came up, I'll likely get to submitting it and a couple other patches today or tomorrow.
Comment 48 Frédéric Delanoy 2015-04-04 05:33:59 CDT
Works in wine 1.7.40
Comment 49 Sebastian Lackner 2015-04-04 11:49:29 CDT
(In reply to Frédéric Delanoy from comment #48)
> Works in wine 1.7.40

Are you sure that its fixed? The patch by Erich was not accepted yet, so it must be related to an update of the game itself (or you are using a distro which ships Wine-Staging by default, but then you shouldn't use it for bug reporting).
Comment 50 Frédéric Delanoy 2015-04-04 14:17:00 CDT
(In reply to Sebastian Lackner from comment #49)
> (In reply to Frédéric Delanoy from comment #48)
> > Works in wine 1.7.40
> 
> Are you sure that its fixed? The patch by Erich was not accepted yet, so it
> must be related to an update of the game itself (or you are using a distro
> which ships Wine-Staging by default, but then you shouldn't use it for bug
> reporting).

I used plain compiled wine to test.
I retested using 2005be6dc92c0943ede01525cecad88f8e83c9c7^ and 2005be6dc92c0943ede01525cecad88f8e83c9c7 and couldn't reproduce the original issue either.

The bug probably doesn't trigger anymore due to game update itself.
I'll reopen, and hopefully Jerome can retry himself.
Comment 51 Jerome Leclanche 2015-04-04 14:40:29 CDT
I'm using a patched wine version to play the game. But there was a major game update a couple of days ago, it's likely it was fixed by that.

I'd say keep the bug open until the patch lands.
Comment 52 Frédéric Delanoy 2015-04-17 04:01:10 CDT
(In reply to Jerome Leclanche from comment #51)
> I'm using a patched wine version to play the game. But there was a major
> game update a couple of days ago, it's likely it was fixed by that.
> 
> I'd say keep the bug open until the patch lands.

Problem is, you can't test whether the proposed patch fixes the bug (since *this* bug doesn't appear anymore due to changes in the Hearthstone), so you wouldn't also be able to test later for regression testing.

It would probably be better to close this bug, and create a new bug report with a simpler app showing the issue, so we can test if the proposed fix works.

Erich E. Hoover would probably be most "appropriate" for this since he found the fix and wrote a patch.
Comment 53 Erich E. Hoover 2015-04-17 10:06:45 CDT
(In reply to Frédéric Delanoy from comment #52)
> ...
> It would probably be better to close this bug, and create a new bug report
> with a simpler app showing the issue, so we can test if the proposed fix
> works.
> 
> Erich E. Hoover would probably be most "appropriate" for this since he found
> the fix and wrote a patch.

I'm fine with it either way, since we have no idea what other programs are affected it's really a matter of testing.  I do have some tests attached to the patch that demonstrate the behavior, I'll double check things and try to get the patches submitted during my lunch break today.  I've just been way to busy lately to devote any time to Wine :/
Comment 54 Erich E. Hoover 2015-04-23 12:05:36 CDT
Should this affect any other apps, the problem is now fixed by commit 4b559f02dd6ad61287fb79547c93105aaa2f7525.
Comment 55 Alexandre Julliard 2015-05-01 07:54:05 CDT
Closing bugs fixed in 1.7.42.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to privacy@winehq.org

Hosted By CodeWeavers