Civilization VI (Windows version) failes to start

Questions about Wine on Linux
Locked
rrm
Newbie
Newbie
Posts: 3
Joined: Sat May 13, 2017 4:23 am

Civilization VI (Windows version) failes to start

Post by rrm »

First of all, thanks for Wine :D, I have been running it for many windows games on Ubuntu, with only a few problems.

But I cannot get Civilization VI working. Looking in the AppDB, others had problems too https://appdb.winehq.org/objectManager. ... &iId=34344.

When I start the game I get a black screen. Killing Civ VI, I can see that it had triggered a Firaxis Crash Reporter (I have not yet send a crash report). I am wondering if it is a bug in Cilivization or something missing in Wine, since it is a DX11 (DX12) game.

I am using Wine-2.8 on Ubuntu 16.04 LTS and running the game with:

Code: Select all

env WINEDEBUG=error+all,fixme-all env WINEPREFIX="[game_dir]" wine C:\\windows\\command\\start.exe steam://rungameid/289070 >> games-log.txt 2>&1
The contens of games-log.txt:

Code: Select all

err:ole:CoGetClassObject class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:CoGetClassObject class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:create_server class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:CoGetClassObject no class object {294935ce-f637-4e7c-a41b-ab255460b862} could be created for context 0x17
wine: Call from 0x7b44f1f7 to unimplemented function api-ms-win-crt-stdio-l1-1-0.dll.__stdio_common_vfprintf_s, aborting
err:d3d:match_fbo_tex_update FBO status 0x8cdd
err:d3d:match_broken_arb_fog FBO status 0x8cdd
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:match_fbo_tex_update FBO status 0x8cdd
err:d3d:match_broken_arb_fog FBO status 0x8cdd
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
The error “wine: Call from 0x7b44f1f7 to unimplemented function api-ms-win-crt-stdio-l1-1-0.dll.__stdio_common_vfprintf_s, aborting”, is this enough to crash the game?

I am not using any winetrick or dll. I have manual installed the vc_redist.x64.exe and vc_redist.x86.exe, since it seems not to be run properly by steam (a regkey was not created). Winearch is 64 bit.

I am a little stuck, any advice on how to troubleshoot the problem?

Regards
rrm
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Civilization VI (Windows version) failes to start

Post by Bob Wya »

@rrm

If you want to test out DirectX 11.x support then I generally recommend testing with Wine Staging (version 2.8 was released yesterday) first.
DirectX 12.x support does not exist in Wine...

You can also test out setting the registry key:

Code: Select all

HKCU/Software/Wine/Direct3D/MaxVersionGL
to force a higher OpenGL profile version, wine then allows a higher DirectX version. It's a DWORD and you should use something like 00030002 (hexidecimal) (aka. OpenGL 3.2).
See WineHQ Wiki: Useful Registry Keys ...

But don't expect too much, it's still not complete. :cry:

You might also want to try:

Code: Select all

winetricks d3dx11_43 d3dcompiler_43
if the program crashes after setting that registry key.

But most importantly someone - who enjoys this game and wants to play it under Wine - needs to submit some bug reports!
The game has no bug reports and no WineHQ AppDB maintainer - so it's going nowhere rapidly!!

Does the native Linux version not work then? :?

There should be a lot of progress on DirectX 11 support this year...
Many games are at the point where you can get in game and experience lots of DirectX 11 rendering errors (e.g. Just Cause 2) and awful performance... 8)

Bob
rrm
Newbie
Newbie
Posts: 3
Joined: Sat May 13, 2017 4:23 am

Re: Civilization VI (Windows version) failes to start

Post by rrm »

Hi

Tried with wine-2.8 (staging), set the reg key and winetricks and got the following error.

Code: Select all

Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
err:ole:CoGetClassObject class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:CoGetClassObject class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:create_server class {294935ce-f637-4e7c-a41b-ab255460b862} not registered
err:ole:CoGetClassObject no class object {294935ce-f637-4e7c-a41b-ab255460b862} could be created for context 0x17
wine: Call from 0x7b44ff27 to unimplemented function api-ms-win-crt-stdio-l1-1-0.dll.__stdio_common_vfprintf_s, aborting
err:d3d:match_fbo_tex_update FBO status 0x8cdd
err:d3d:match_broken_arb_fog FBO status 0x8cdd
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:match_fbo_tex_update FBO status 0x8cdd
err:d3d:match_broken_arb_fog FBO status 0x8cdd
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
err:d3d:wined3d_adapter_find_polyoffset_scale PolygonOffset scale factor detection failed, using fallback value 2^23.
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
I will create a bug report in the AppDB then.

I do not own the linux version, so i cannot try.

rrm
User avatar
Leopard
Level 2
Level 2
Posts: 36
Joined: Sun Apr 23, 2017 9:29 am

Re: Civilization VI (Windows version) failes to start

Post by Leopard »

Well , CiV VI has a native Linux version. Why are you bothering with Windows version?
rrm
Newbie
Newbie
Posts: 3
Joined: Sat May 13, 2017 4:23 am

Re: Civilization VI (Windows version) failes to start

Post by rrm »

Hi, I have created the following bug https://bugs.winehq.org/show_bug.cgi?id=43046 and i try to implement the function using existing function i wine.

I have done the following:
In api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec added

Code: Select all

#@ stub __stdio_common_vfprintf_s
@ cdecl __stdio_common_vfprintf_s(ptr str ptr) ucrtbase.__stdio_common_vfprintf_s
And in ucrtbase/ucrtbase.spec added

Code: Select all

#@ stub __stdio_common_vfprintf_s
@ cdecl __stdio_common_vfprintf_s(ptr str ptr) MSVCRT__stdio_common_vfprintf_s
And the implementation in msvcrt/file.c (borrowing from a similar function)

Code: Select all

/*********************************************************************
 *              __stdio_common_vfprintf_s (MSVCRT.@)
 */
int CDECL MSVCRT__stdio_common_vfprintf_s(MSVCRT_FILE *file, const char *format, __ms_va_list valist)
{
    int ret;

    if (!MSVCRT_CHECK_PMT( file != NULL )) return -1;

    MSVCRT__lock_file(file);

    FIXME("test"); // just some test out, so i can see it get called

    ret = MSVCRT_vfprintf_s(file, format, valist);

    MSVCRT__unlock_file(file);

    return ret;
}
Compiling the code (only 64 bit) and installing it in /opt/wine-test/ (configured with ../wine-source/configure --enable-win64 --prefix /opt/wine-test)

Then trying to start the game using

Code: Select all

env WINEDEBUG=error+all,fixme+all env WINEPREFIX="[path-to-game]" /opt/wine-test/bin/wine64 C:\\windows\\command\\start.exe steam://rungameid/289070 >> games-log.txt
Wine is still complaining about vfprintf_s in api-ms-win-crt-stdio-l1-1-0.dll.
Am i doing something wrong when implementing the function or missing something? (i have standard wine 2.9, wine staging and wine-devel installed)

rrm
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Civilization VI (Windows version) failes to start

Post by Bob Wya »

rrm wrote:...
Compiling the code (only 64 bit) and installing it in /opt/wine-test/ (configured with ../wine-source/configure --enable-win64 --prefix /opt/wine-test)
...
That won't work very well...
See WineHQ Building Wine # 2.1 Configure Options...
Even for a pure 64-bit Windows game - there will most likely still be a requirement, at some point, to execute some 32-bit Windows code / API.
This requirement is very hard to avoid!

If you want to compile Wine from source then you really need to build a (Syswow) multilib version - for best compatibility with Windows software (32-bit and "pure" 64-bit)...

I would second the suggestion to use the native Linux version of Civilisation VI... I would probably be a whole lot easier!

Bob
Locked