WineHQ
Bug Tracking Database – Bug 43011

 Bugzilla

 

Last modified: 2018-01-04 10:17:45 CST  

StarCraft Brood War 1.18 significant delays in CEF Browser

Bug 43011 - StarCraft Brood War 1.18 significant delays in CEF Browser
StarCraft Brood War 1.18 significant delays in CEF Browser
Status: UNCONFIRMED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: -unknown
2.8
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on: 42741
Blocks:
  Show dependency tree
 
Reported: 2017-05-12 08:20 CDT by Igor Polyakov
Modified: 2018-01-04 10:17 CST (History)
11 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: Ubuntu
Staged patchset:


Attachments
first file that gets loaded (4.42 KB, text/html)
2017-05-12 08:20 CDT, Igor Polyakov
Details
second file that gets loaded (4.63 KB, text/html)
2017-05-12 08:21 CDT, Igor Polyakov
Details
third file that gets loaded (3.02 KB, text/html)
2017-05-12 08:22 CDT, Igor Polyakov
Details
The logs starting from when you go to the battle.net menu up until it gets loaded (8.18 KB, text/plain)
2017-05-12 08:23 CDT, Igor Polyakov
Details
Firewall calls (754 bytes, text/plain)
2017-05-22 15:14 CDT, Igor Polyakov
Details
this is with ClientSdkFireWallHelper.exe renamed (428 bytes, text/plain)
2017-05-22 15:27 CDT, Igor Polyakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Polyakov 2017-05-12 08:20:38 CDT
Created attachment 58153 [details]
first file that gets loaded

I built this version of Wine to run StarCraft 1.18: https://github.com/awesie/wine-starcraft

The single player works fine. However, when I click on Multiplayer, there's a slight delay and it loads http://127.0.0.1:42475/gamedata/webui/dist/LANProtocolSelectionPanel/LANProtocolSelectionPanel.html?port=42475&guid=6334

then it loads http://127.0.0.1:42475/gamedata/webui/dist/GatewayPanel/GatewayPanel.html?port=42475&guid=41

then it loads http://127.0.0.1:42475/gamedata/webui/dist/InfoPanel/InfoPanel.html?port=42475&guid=18467

after that, it starts to load the corresponding JS files

and only after all of that, there's a longer delay and it starts to download http://127.0.0.1:42475/gamedata/webui/dist/lib/fonts/Eurostile-Reg.otf

once that is done, I see text in the Battle.net menu

Also, it starts to download http://127.0.0.1:42475/gamedata/webui/dist/lib/fonts/EurostileExt-Reg.otf and when that is done, the text changes in appearance

All in all, it takes a little bit over 30 seconds to finish loading this menu. It takes as long to show the login modal. It takes this long to show the create game modal. It takes as long to show player names in the game menu.

While the game is playable when I start it, the delay in making the game often makes people leave before I can even select my race or see their chat messages.
Comment 1 Igor Polyakov 2017-05-12 08:21:54 CDT
Created attachment 58154 [details]
second file that gets loaded
Comment 2 Igor Polyakov 2017-05-12 08:22:24 CDT
Created attachment 58155 [details]
third file that gets loaded
Comment 3 Igor Polyakov 2017-05-12 08:23:24 CDT
Created attachment 58156 [details]
The logs starting from when you go to the battle.net menu up until it gets loaded
Comment 4 Olivier F. R. Dierick 2017-05-12 09:56:31 CDT
(In reply to Igor Polyakov from comment #0)
> I built this version of Wine to run StarCraft 1.18:
> https://github.com/awesie/wine-starcraft
> 

This is a custom patched wine version.
Please retest with plain wine or wine-staging (development version is currently 2.7).
Comment 5 Bruno Jesus 2017-05-12 10:23:19 CDT
(In reply to Olivier F. R. Dierick from comment #4)
> This is a custom patched wine version.
> Please retest with plain wine or wine-staging (development version is
> currently 2.7).

This bug depends on bug 42741, it is currently not testable in plain nor staging.
Comment 6 Tim 2017-05-13 02:29:06 CDT
@Igor I still didn't experience this behaviour. Can I provide any information about my setup that might help find the cause?
Comment 7 Igor Polyakov 2017-05-13 03:10:24 CDT
(In reply to Tim from comment #6)
> @Igor I still didn't experience this behaviour. Can I provide any
> information about my setup that might help find the cause?

Sure, I'd like to see who has this issue and who doesn't. I am on Ubuntu 17.04, I have an Intel i7-4770k processor and an AMD R9 290 graphics card.

https://www.twitch.tv/videos/141235185

you can see how it happens in my video
Comment 8 Tim 2017-05-13 05:02:25 CDT
(In reply to Igor Polyakov from comment #7)
> (In reply to Tim from comment #6)
> > @Igor I still didn't experience this behaviour. Can I provide any
> > information about my setup that might help find the cause?
> 
> Sure, I'd like to see who has this issue and who doesn't. I am on Ubuntu
> 17.04, I have an Intel i7-4770k processor and an AMD R9 290 graphics card.

[...]

I'm on Zesty as well, running on a quite old laptop with an Intel P6200 (has integrated HD Graphics). Kernel is a custom 4.11 (could provide my .config, but I doubt that this is a kernel issue)

As I don't have much experience with wine, I struggled to get this to work and tried many things over two days. From memory and current config, here's what currently works for me:
1. set up a chroot to build wine and run the game as explained here: https://wiki.winehq.org/Building_Wine
2. apt-get build-dep wine32-development to satisfy the dependencies, added libva-dev manually, a plain ./configure then gives me no warnings that seem important, make && make install
3. winetricks corefonts
4. winecfg options:
- default Windows Version is Windows 7, for StarCraft.exe it's WinXP                        
- default Staging: checkboxes 1, 2 and 4 checked
- StarCraft.exe Staging: I just realized, that those options are also application specific...so no boxes checked, which confuses me as the STARCRAFT note in the src explicitly states to check box 4 to avoid crashes which do not happen for me
5. I used StarCraft-Setup.exe from Blizzard to install the game, the .exe for the public test realm also works

I'm not sure if this is any help, but I'd be happy to provide more information. Or even start from scratch to reproduce my exact steps.
Comment 9 Igor Polyakov 2017-05-13 08:11:57 CDT
I built it with LXC like it says here https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu

but I also have a binary from someone else that I test on, the results are the same

it also works with WINEARCH=win64 the same way, around the same amount of delay.
Comment 10 E. Demirkan 2017-05-14 11:05:56 CDT
Hi Igor,
I created a custom installer for StarCraft 1.18.x on Ubuntu using the latest wine-staging source code. Andrew's build was based on 2.6, this uses 2.7 and you don't need to set XP mode for StarCraft.exe .It works with Global Settings (Windows 7) Actually, it crashes if you do otherwise :)

Give it a shot, maybe it helps your CEF latency issue.

https://github.com/aveferrum/wine-starcraft-installer
Comment 11 Igor Polyakov 2017-05-15 01:34:54 CDT
I just tried the script. It worked well to install the game and get to run. But it does not actually fix the issue.
Comment 12 Igor Polyakov 2017-05-19 17:11:12 CDT
I tried running this on 2.8 staging, I'm still getting this issue. I also switched to LXDE and that didn't affect it.
Comment 13 R Domingues 2017-05-22 11:47:31 CDT
I have the same issue - running Fedora 25, GNOME X11, on a Intel CPU with HD3000 integrated graphics.

Using wine 2.8 staging the game installs, loads and plays perfectly without any modification to wine.

On the other hand, when connecting to BNET the UI interface appears without any text, unless I wait 2-3 minutes. Whenever I change menus I have to wait another 2-3 minutes for the text to appear.

This issue is not exclusive to Wine as there are people reporting this issue on Windows/MAC machines in the BNET forums.

I have another machine, running Windows 8.1, where I can play multiplayer flawlessly from a USB drive. Bizarrely, I run into the same issue if I start the game from a copy in the machine's HDD - menus without any text.

On another machine running Windows 7, I have no trouble playing from either the USB or the HDD.

Every time I load the game on the Windows machines, a popup appears asking if I want to add the game to the Windows firewall. On Wine the same popup never appears.
Comment 14 E. Demirkan 2017-05-22 14:42:36 CDT
(In reply to R Domingues from comment #13)
> I have the same issue - running Fedora 25, GNOME X11, on a Intel CPU with
> HD3000 integrated graphics.
Hi,

In my current working no-delay-in-Bnet setup, I found that StarCraft.exe is spawning a ClientSdkFirewallHelper.exe process to check if StarCraft.exe is excluded from Firewall or not. 

0009:Call KERNEL32.CreateProcessW(00000000,037991b4 L"ClientSdkFirewallHelper.exe -check \"C:\\local_games\\StarCraft\\StarCraft.exe\"",00000000,00000000,00000000,08000020,00000000,0390bf94 L"C:\\local_games\\StarCraft",0032f3cc,0032f410) ret=1006ee90

....
[snip]

with a return of:

0009:Ret  KERNEL32.CreateProcessW() retval=00000001 ret=1006ee90

and generating a FIXME of "fixme:hnetcfg:fw_profile_get_FirewallEnabled 0x12fdb0, 0xc2f5a0"

Now, I am not sure what "retval=00000001" means...An error? A confirmation that StarCraft.exe is excluded from the firewall? Or something else. Afaik there's no firewall implementation in Wine.

Here, https://us.battle.net/forums/en/starcraft/topic/20754425833 Blizzard dev suggests checking/allowing StarCraft.exe on the firewall using the following command. (ClientSdkFirewallHelper.exe should be within the same folder with StarCraft.exe)

"ClientSdkFirewallHelper.exe -allow [Path to starcraft.exe]"

If this solves your popup and delay issue on Windows 8.1 we may narrow the issue to Firewall call. What I am thinking that, once you enter the multiplayer menu,  ClientSdkFirewallHelper gets fired but unable to return immediately causing a timeout and delay for the main StarCraft.exe process. And following that for each subsequent action, called again..and again waiting for a timeout to continue.

Another workaround may be deleting/renaming "ClientSdkFirewallHelper.exe". Once I renamed that file, I didn't get a crash but SC asked me to "add StarCraft to the whitelist" each time I clicked on the Multiplayer menu. I selected OK/cancel and again once I got into the Bnet menu, there was no delay.

You can create a more detailed log adding the WINEDEBUG=+relay prefix and dump the output to a file for further inspection. Search for "FireWall", I hope your debug output may bring us one step closer to the solution. 

WINEDEBUG=+relay WINEPREFIX="/home/ras/wine-prefix/sc/" wine /home/ras/wine-prefix/sc/drive_c/local_games/StarCraft/StarCraft.exe &>relmsg.log
Comment 15 Igor Polyakov 2017-05-22 15:13:20 CDT
I tried this, but renaming the file only gave me the prompt. The Battle.net menus are still slow. I reverted the change and ran it with WINEDEBUG set to +relay. I can't attach the whole file, since it's 400MB. I'll attach the relevant lines.
Comment 16 Igor Polyakov 2017-05-22 15:14:37 CDT
Created attachment 58253 [details]
Firewall calls

This is with ClientSdkFirewallHelper.exe present
Comment 17 Igor Polyakov 2017-05-22 15:27:14 CDT
Created attachment 58254 [details]
this is with ClientSdkFireWallHelper.exe renamed
Comment 18 R Domingues 2017-05-24 16:13:38 CDT
(In reply to Evren from comment #14)
> Here, https://us.battle.net/forums/en/starcraft/topic/20754425833 Blizzard
> dev suggests checking/allowing StarCraft.exe on the firewall using the
> following command. (ClientSdkFirewallHelper.exe should be within the same
> folder with StarCraft.exe)
> 
> "ClientSdkFirewallHelper.exe -allow [Path to starcraft.exe]"

I think you've got it wrong, the DEV asked a user to download and run a different utility than the one present in the game folder (same name, different files ~400kb vs ~250kb). I ran it and it simply added both starcraft.exe and mdnsresponder.exe to the Windows firewall. When I run the game, the pop up doesn't show anymore but the problem still remains.

I deleted starcraft.exe and mdnsresponder.exe entries from the firewall whitelist, and I ran StarCraft from the USB drive. The popup appears, I press OK but nothing is added to the firewall. The moment I select a gateway and try to login I get a message from the Windows Firewall asking to add StarCraft to the whitelist. mdnsresponder.exe is not whitelisted but the game still runs.


> If this solves your popup and delay issue on Windows 8.1 we may narrow the
> issue to Firewall call. What I am thinking that, once you enter the
> multiplayer menu,  ClientSdkFirewallHelper gets fired but unable to return
> immediately causing a timeout and delay for the main StarCraft.exe process.
> And following that for each subsequent action, called again..and again
> waiting for a timeout to continue.

It may be worth noting that while the text is not rendered, the starcraft doesn't lock. I can't still go back in the menus.
Comment 19 Igor Polyakov 2017-05-29 01:35:13 CDT
I installed a fresh Ubuntu 17.04 on a separate hard drive; installed 32 bit drivers and installed the game fresh. I'm still running into this issue.
Comment 20 Igor Polyakov 2017-06-15 00:14:17 CDT
I tried a clean 16.04 Ubuntu install and this bug is gone. I did roughly the same steps as a clean 17.04 install which had this bug. This is regression in Ubuntu 17.04
Comment 21 winetest 2017-06-15 03:19:58 CDT
(In reply to Igor Polyakov from comment #20)
> I tried a clean 16.04 Ubuntu install and this bug is gone. I did roughly the
> same steps as a clean 17.04 install which had this bug. This is regression
> in Ubuntu 17.04

Does your wine versions match also if you build from source do you have the same configuration at compile time?
Comment 22 Igor Polyakov 2017-06-15 19:49:34 CDT
(In reply to winetest from comment #21)
> (In reply to Igor Polyakov from comment #20)
> > I tried a clean 16.04 Ubuntu install and this bug is gone. I did roughly the
> > same steps as a clean 17.04 install which had this bug. This is regression
> > in Ubuntu 17.04
> 
> Does your wine versions match also if you build from source do you have the
> same configuration at compile time?

I installed 2.10 staging on both by following the steps here:

https://wine-staging.com/installation.html#distro_ubuntu
Comment 23 Jan Kroeze 2017-08-24 17:06:21 CDT
This bug also affects StarCraft Remastered v1.20.2.2660 using wine 1.15 (staging).

The Battle.net forums have many reports of the same symptoms. Most of them seem to be related to anti-virus programs or firewalls.

Has anyone had any luck fixing this problem?
Comment 24 Igor Polyakov 2017-08-25 02:51:00 CDT
Yes, installing Ubuntu 16.04 instead of 17.04 resolved my issue.


Hosted By CodeWeavers