ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.58k stars 1.07k forks source link

Foundation (690830) #2318

Open Sebastiangperez opened 5 years ago

Sebastiangperez commented 5 years ago

Compatibility Report

System Information

I confirm:

Symptoms

The game has some error related on his translation game's log output said this: ERROR Core GamCLocalizationManager::loadFile JSON parsing error: 3

Also the game hangs after pressing the market button, keeping the music / sound in the background.

Reproduction

Press play on the Steam button

kisak-valve commented 5 years ago

Hello @Sebastiangperez, please add PROTON_LOG=1 %command% to the game's launch options and drag and drop the generated $HOME/steam-$APPID.log into the comment box.

Sebastiangperez commented 5 years ago

Zipped , is 60mb long and i run the game until hangs . this game is made by a custom engine and uses i think opengl 4.3
steam-690830.log.tar.gz

Sebastiangperez commented 5 years ago

Yesterday , i tested the game again , when i clicked on the market button in the build menu , the game got freeze and hanged my entire pc. Maybe is a memory leak ? im on Fedora 29

TeaObvious commented 5 years ago

I have got a similar but still different problem. For me the game launches, gets into the loading screen and then crashes with eventfd: Too many open files: steam-690830.log

When i switch from proton 3.16 to 3.7. then the game simply locks up without crashing.

If i go ahead and increase the ulimit to over 60.000 then the game works, but the localization is missing because the game keeps saying ERROR Core GamCLocalizationManager::loadFile JSON parsing error: 3

Throwing strace at the game shows this:

22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/achievements.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor) 22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/agents.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor) 22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/buildings.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor)

This seems to be a big bug in the Game and not fixable by Proton, since the file seems to be found and loaded. Additionally to this, they constantly try to close thousands of files they never opened, so i guess even if the game would have the localization we might get the trouble @Sebastiangperez talked about.

Sebastiangperez commented 5 years ago

@Legodev Hi , thanks for your response. maybe someone will contact with this guys and tell this bug.

Sebastiangperez commented 5 years ago

This is an update

I have got a similar but still different problem. For me the game launches, gets into the loading screen and then crashes with eventfd: Too many open files: steam-690830.log

When i switch from proton 3.16 to 3.7. then the game simply locks up without crashing.

If i go ahead and increase the ulimit to over 60.000 then the game works, but the localization is missing because the game keeps saying ERROR Core GamCLocalizationManager::loadFile JSON parsing error: 3

Throwing strace at the game shows this:

22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/achievements.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor) 22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/agents.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor) 22:32:33 openat(AT_FDCWD, "/mnt/bcachedata/Steam/SteamApps/compatdata/690830/pfx/dosdevices/z:/mnt/bcachedata/Steam/SteamApps/common/Foundation/localization/en/buildings.json", O_RDONLY|O_NONBLOCK) = 39487 22:32:33 close(39487) = 0 22:32:33 close(-1) = -1 EBADF (Ungültiger Dateideskriptor)

This seems to be a big bug in the Game and not fixable by Proton, since the file seems to be found and loaded. Additionally to this, they constantly try to close thousands of files they never opened, so i guess even if the game would have the localization we might get the trouble @Sebastiangperez talked about.

This is an Update , yesterday arrived a new patch that fixed the bug , i could play the game without freezing. The text translations is still missing and only shows the JSON keys.

MadByteDE commented 5 years ago

The text translations is still missing and only shows the JSON keys.

This can easily be fixed by installing vcrun2017: WINEPREFIX=/your_path_to_steamLibrary/steamapps/compatdata/690830/pfx winetricks -q vcrun2017

[EDIT 2: no need to enable D9VK anymore. it will be used automatically.. So everything below is outdated ] Also the game performance is highly improved by using D9VK instead of the default WineD3D and maybe can fix the "Shader compilation error: gl_FragColor undeclared" error as well (AMD GPU users).

[EDIT: The following is outdated, D9VK now can be enabled with Proton > 4.11 using "PROTON_USE_D9VK=1 %command%"]

If you want to try to implement it in Proton 4.2 follow these instruction provided by user pchome:

  1. Download D9VK (https://github.com/Joshua-Ashton/d9vk/releases)
  2. Add d3d9.dll from D9VK/x32 to /your_path/steamapps/common/Proton 4.2/dist/lib/wine/d9vk/
  3. Add d3d9.dll from D9VK/x64 to /your_path/steamapps/common/Proton 4.2/dist/lib64/wine/d9vk/
  4. Download the patch text file: proton-4.2-d9vk.patch.txt
  5. Copy text file to Proton's directory and execute patch -p1 < proton-4.2-d9vk.patch.txt Now it will be used as default. If you want to disable it use PROTON_NO_D9VK=1 %command%
Sebastiangperez commented 5 years ago

I stopped playing this game a few months ago because it crashes on start. I will check the work around about the text.

TeaObvious commented 5 years ago

I can confirm the game now works fine using:

MadByteDE commented 5 years ago

a higher ulimit -n to raise the open file limit to work around the crash at startup

btw this seems to be a distro based "issue". My ulimit already was pretty high by default (#DefaultLimitNOFILE=1024:524288 on Manjaro).

TeaObvious commented 5 years ago

yes mine is fixed to 1024, simply because this normally is more then enough and if more is required this is usually a bug in your software. I know how to permanently change it, but i don't want to.

For everyone who wants to know the file location it can be done in /etc/sysctl.conf using fs.file-max but its better to use /etc/security/limits.conf

Edit: on non systemd linux distributions

MadByteDE commented 5 years ago

Maybe you should say which distro you're on, because the filenames and locations differ based on the distro you're using.Here you can find some more infos on the topic: https://github.com/lutris/lutris/wiki/How-to:-Esync

kekonn commented 5 years ago

I can confirm the game now works fine using:

* a higher `ulimit -n` to raise the open file limit to work around the crash at startup

* `WINEPREFIX=/your_path_to_steamLibrary/steamapps/compatdata/690830/pfx winetricks -q vcrun2017` to fix the displayment of the text
  **Note:** for some reason i needed to delete the pfx folder, start the game and then execute winetricks again

Hi All, I tried the winetricks solution for the text problem but I still have only text keys. My system:

Steam log in gist.

Sebastiangperez commented 5 years ago

Yesterday after long time not playing the game, i played and works great but still uses 2.5 gb of ram ( i dont know if is an issue) Today i will try the text display stuff that someone mentioned above.

kekonn commented 5 years ago

Yesterday after long time not playing the game, i played and works great but still uses 2.5 gb of ram ( i dont know if is an issue) Today i will try the text display stuff that someone mentioned above.

If you find a way to fix the text issue, it is allowed to use 6 GB of RAM for all I care.

kekonn commented 5 years ago

I found the following block in my Proton log:

Cell windowFocused not defined in ui.package    
Cell textfieldDropTarget not defined in ui.package    
Cell textfieldError not defined in ui.package    
Register Static Object: 10.18 ms    
Web ThreadLocal Init     
Request analytics server url    
Web ThreadLocal Init    
JSON parsing error: 3      
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
createTextWithViewParameters received unused views: #.COMMUNITY_TRANSLATION    
createTextWithViewParameters received unused views: #.DISCORD    
Web ThreadLocal Init    
Analytics server address: https://www.polymorph.games/analytics/    
Analytics HTTP result: 2313654    
Analytics HTTP result: OK
unselchr commented 4 years ago

I found the following block in my Proton log:

Cell windowFocused not defined in ui.package    
Cell textfieldDropTarget not defined in ui.package    
Cell textfieldError not defined in ui.package    
Register Static Object: 10.18 ms    
Web ThreadLocal Init     
Request analytics server url    
Web ThreadLocal Init    
JSON parsing error: 3      
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
JSON parsing error: 3    
createTextWithViewParameters received unused views: #.COMMUNITY_TRANSLATION    
createTextWithViewParameters received unused views: #.DISCORD    
Web ThreadLocal Init    
Analytics server address: https://www.polymorph.games/analytics/    
Analytics HTTP result: 2313654    
Analytics HTTP result: OK

I can confirm similar outputs for me after following all recommendations and with multiple installs/attempts. I also tried using wine tricks and proton tricks. Using proton 4.2-9 My System:

jury68000 commented 4 years ago

The text translations is still missing and only shows the JSON keys.

This can easily be fixed by installing vcrun2017: WINEPREFIX=/your_path_to_steamLibrary/steamapps/compatdata/690830/pfx winetricks -q vcrun2017

This did not help me. I still see those JSON keys instead proper labels :(

marwonline commented 4 years ago

I was using the free AMD driver of Manjaro and got always the shader error: gl_FragColor undeclared. RX580

With the properitary AMD driver for Archlinux AUR I'm able to start the game.

Still have two unresolved issues:

![Bildschirmfoto zu 2020-02-02 12-09-10](https://user-images.githubusercontent.com/25180025/73607512-1dd43680-45b7-11ea-9d9c-54b9288a24b6.png)

EDIT: Found this report on WineHQ: https://forum.winehq.org/viewtopic.php?t=32488

kisak-valve commented 4 years ago

Hello @marwonline, please copy your system information from Steam (Steam -> Help -> System Information) and put it in a gist, then include a link to the gist in this issue report.

marwonline commented 4 years ago

@kisak-valve here the gist. BTW: I got the pfx folder from @Legodev and the localization works fine. Not sure what's wrong on my installation.

hakzsam commented 4 years ago

@kisak-valve It's an OpenGL game, so Mesa drivers can be removed.

RobertZenz commented 4 years ago

@Legodev Installing vcrun2017 does not fix the translation/string issue for me...did you install anything else?

Danii0206 commented 4 years ago

Hi,

I played this game on Windows before. Now I switched to Linux Mint and I got this error:

Shader compilation Error Shader: natives/color2d

Has anyone got it working with proton or wine on AMD graphics with mesa drivers?

Kind regards Danii

kaimast commented 4 years ago

Shader compilation Error Shader: natives/color2d

I have the same error with Intel graphics on Proton 5.0...

leinardi commented 4 years ago

Are there any news about this game? Has anyone tried with Proton 5.0-10 RC or Proton-5.9-GE-6-ST?

leinardi commented 4 years ago

This is not the update I was hoping for... @Sebastiangperez why closing the issue? The game still doesn't work...

Sebastiangperez commented 4 years ago

This is not the update I was hoping for... @Sebastiangperez why closing the issue? The game still doesn't work...

Sorry , i wanna delete the comment, my comment

leinardi commented 4 years ago

@Sebastiangperez if you close the issue by mistake, could you please reopen it? Other people, me included, are still interested in playing this game with Proton. If you don't want to receive updates on this issue you can use the Unsubscribe button on the side menu.

Sebastiangperez commented 4 years ago

@Sebastiangperez if you close the issue by mistake, could you please reopen it? Other people, me included, are still interested in playing this game with Proton. If you don't want to receive updates on this issue you can use the Unsubscribe button on the side menu.

I press the wrong button, sorry about that The game for me do not work now , i dont know if the is some new bug or something like that.

MadByteDE commented 4 years ago

Since I'm now also running on an AMD GPU I can help a bit too.

I began to tinker around a bit more. I found that the root issue seems to be some deprecated shader code, namely "gl_FragColor" and "gl_FragData". I tried extracting the shader files from the .package files in the game directory and change them to get rid of the deprecated code and replace them with the updated methods (for testing purposes)...with partial success (proceeding to the load screen and see the bar fill to 100%) but after that the game still crashes. The games own error log doesn't show any "gl_FragColor" or "gl_FragData" related errors anymore but many others. I recognize some of the errors from when I first tested the game (using an NVIDIA GPU), so I know that at least a handful of them shouldn't crash the game since it still worked back then.

Here is the error log I currently get: GIST

It might be helpful if someone who is able to launch past the loading screen (to the main menu) could provide a game error log or PROTON_LOG to filter out the errors only I get.

EDIT: I've just seen that the game seems to crash for others (including nvidia users) as well starting with version 1.6.14.0717. Maybe that's another issue now.

Sebastiangperez commented 4 years ago

EDIT: I've just seen that the game seems to crash for others (including nvidia users) as well starting with version 1.6.14.0717. Maybe that's another issue now.

1.6.20+ is not working either. crashes when the green bar finishes fill up Linux using Proton and Nvidia Drivers

MadByteDE commented 4 years ago

I was using the free AMD driver of Manjaro and got always the shader error: gl_FragColor undeclared. RX580

With the properitary AMD driver for Archlinux AUR I'm able to start the game.

That was seemingly the key hint. Turns out there is an issue with the open-source Mesa driver which caused the shader error for the game when the shader code uses deprecated stuff. Well, technically it's an error by the developer, but read about it yourself. What I did by changing the shader code worked, because I made it compatible to the core profile that way. Let's see if this will be merged and backported into the stable Mesa driver.

Well, let's tackle the next issue shall we? :grin:

MadByteDE commented 4 years ago

Okay, I'm now able to launch the game and play. There's still the issue with the strings that I'll try to figure out now, and trying to access the settings menu results in another crash. but it's progress. As workaround it's possible to change settings via the usersettings.config file that is generated at /home/USERNAME/.steam/steam/steamapps/compatdata/690830/pfx/drive_c/users/steamuser/My Documents/Polymorph Games/Foundation/ on my end.

The crash when entering the main menu is caused by an issue with "AchievementsVDF.vdf" in the localization files. Removing it or removing it's content let the game launch into the main menu. I guess that this might be something that can be fixed within Proton, since the vdf format seems to be introduced through steam/steamworks and not by the developer via a third party lib.

That's all I can say atm.

MadByteDE commented 4 years ago

@marwonline do you still got the directory with the fixed translation strings? Maybe it could help find the issue. I'm not able to fix the strings with vcrun2017 anymore and I just can't get behind what's actually missing. That a specific pfx directory from someone can solve this seems kinda suspicious to me.

TeaObvious commented 4 years ago

@MadByteDE there is some dependency missing or some registry settings got changed. The problem is i can't reproduce the steps i did to get the environment working. With a working environment it worked instant on all machines i tested, but yeah i simply dunno how i got it working. :(

Edit: i now tried to launch the game again after a very long time while changing my gpu. Now the game does not startup any more with "Shader: natives/color2d" ... I packaged my pfx before trying this, so it should be the same version i send marwonline. So if you want i can send it to you as well.

MadByteDE commented 4 years ago

@Legodev If it's the old version with the working translations, that would be great.

TeaObvious commented 4 years ago

I used to see them. How ever since i had to much to do i had no time to fix the shader problems, that's why i can't tell you if i would still see them.

smirgol commented 4 years ago

I've asked them to modify their shaders and specify the compat profile in them, hoping that this will fix this shader issue. To my surprise they actually implemented that. :-) It should be deployed with one of the next updates.

The way Mesa behaves in this case is actually according to the specs, which state that if no profile is defined, it will default to core. Since they use a compat context in this game, shaders break. No idea why the closed source drivers don't stick to the specs here.

MadByteDE commented 4 years ago

I've asked them to modify their shaders and specify the compat profile in them, hoping that this will fix this shader issue. To my surprise they actually implemented that. :-) It should be deployed with one of the next updates.

The way Mesa behaves in this case is actually according to the specs, which state that if no profile is defined, it will default to core. Since they use a compat context in this game, shaders break. No idea why the closed source drivers don't stick to the specs here.

Nice. :) I've seen the discussion in the Mesa bug tracker about the spec. They filed a spec bug about that, let's see what they decide. I'm curious why the closed source drivers work different then the spec seemed to define this.

As a reminder, we still need to find out why the archievments.vdf file cause a crash & what is causing the string issue.

MadByteDE commented 4 years ago

I now got my strings, translations and settings menu working again - a fully working game! yay

What actually did the trick for me was updating my winetricks script via "sudo winetricks --self-update" & after that reinstall vcrun2017 via "WINEPREFIX=/YOUR/PATH/TO/STEAMAPPS/steamapps/compatdata/690830/pfx winetricks -q vcrun2017". If reinstalling vcrun2017 doesn't work for you, try to delete the prefix directory, regenerate it by launching the game once and then try again to install vcrun2017.

To sum it up

I hope this also work for you guys.

MadByteDE commented 4 years ago

Edit: NOTE: This is outdated. The game receives offical updates to fix all issues in the near future (Game versions > 1.6.20).

I made a small script to automatically fix all issues. I can't guarantee that it will work for you, but it's tested on Manjaro Linux + Gnome. The shader fix can be applied to fix the shader code until the game dev releases an offical patch for the game. To use it extract the archive and put it's content into the game root directory (ie. "/home/USERNAME/.steam/steam/steamapps/common/Foundation/apply_fixes.sh") & run the script.

Notice: In order to update winetricks automatically, the script will ask you for root permission. If you decline it, you have to update winetricks and install vcrun2017 yourself.

Make sure to run the game at least once before launching the script

Foundation_v1.6.20_Fixer

Let me know if it worked for you.

leinardi commented 4 years ago

Hey, I have not bought the game yet because it is currently marked as broken on ProtonDB. I'm playing on Nvidia, is installing vcrun2017 using winetricks the only thing needed to play the game? Is the game fully playable? Are there other unsolved known issues?

MadByteDE commented 4 years ago

Hey, I have not bought the game yet because it is currently marked as broken on ProtonDB. I'm playing on Nvidia, is installing vcrun2017 using winetricks the only thing needed to play the game? Is the game fully playable? Are there other unsolved known issues?

on NVIDIA you should be fine with updating winetricks via "sudo winetricks --self-update" and then installing vcrun2017 in the game prefix. Nobody can guarantee you that it will work on your system (I just found that these steps work reliable for my system ). You could try it and if it's not working you could refund the game - or wait until the game works out of the box with Proton.

leinardi commented 4 years ago

Yeah, I know it really depends on the configuration, but I was curious to know if, with some configuration, the game is right now fully playable on Linux using Proton.

MadByteDE commented 4 years ago

On my end, yes - it's fully playable. youtube video

kisak-valve commented 4 years ago

Hello @MadByteDE, I've been looking around for the copyright license of this game and I'm having a hard time finding it. The closest thing I've found is "Note: Publicly sharing of Polymorph Games game files and assets is strictly prohibited by copyright law." on http://www.polymorph.games/foundation/modding/texture-usage-policy. Please adjust your workaround so that it modifies the existing files from a game install instead of redistributing shaders.

MadByteDE commented 4 years ago

Hello @MadByteDE, I've been looking around for the copyright license of this game and I'm having a hard time finding it. The closest thing I've found is "Note: Publicly sharing of Polymorph Games game files and assets is strictly prohibited by copyright law." on http://www.polymorph.games/foundation/modding/texture-usage-policy. Please adjust your workaround so that it modifies the existing files from a game install instead of redistributing shaders.

Thanks for letting me know. The best I can do right know is to ask for permission to distribute the changed shader files to temporarly fix shader issues on linux. But since the dev announced to fix the shaders in a coming update, iĺl take down the files until the update has been released.

TeaObvious commented 4 years ago

Let me know if it worked for you.

The game works perfectly with this patch, thank you for this approach! As for the Text, it worked before and still works so i can't say anything regarding this.

MadByteDE commented 4 years ago

Edit: NOTE: This is outdated. The game receives offical updates to fix all issues in the near future (Game versions > 1.6.20).

I updated the script to remove the shader files. It patches each shader file individually and no longer contains copyrighted content.


What it does

1. Updates your already installed winetricks installation automatically & installs vcrun2017 into the game prefix.

2. For AMD/Intel GPU users: Applies a fix to shader files (compilation error)


How to use it

1. Download the script; extract & copy the files into the Foundation game directory 2. Launch the game at least once before using the script 3. Run the script. It will tell you when it's done. 4. Launch the game.


Download (Mega) Foundation_v1.6.20_Fixer