ValveSoftware / Proton

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

Starfield: Creation Kit (2722710) #7884

Open Blayer98 opened 2 months ago

Blayer98 commented 2 months ago

System Information

I confirm:

Proton Log file: steam-2722710.log

Symptoms

While the application launches fine (sometimes it takes a couple seconds to load and stays on black windows) a popup says that the graphics drivers are 314 days old upon launch but this can be dismissed. Attempting to save an esp fie (plugin) causes the application to crash and a CreationKit_07-10-21-30.dmp file is created in the same folder as both Starfield and CreationKit's exe files. (the date & time will be the date & time of the system you’re using)

The issue of plugins not being saved is not specific to Steam Deck, according to posts on the Steam Community Forums for Starfield’s Creation Kit, it is happening on Linux generally as well, although I don’t know if this is an issue specific to Proton or not.

Reproduction

Simply launch the Creation Kit through Steam. If on Steam Deck like me, you should also get the same graphics driver popup. Once the app has properly loaded, simply attempt to save a new plugin. The application should crash.

kisak-valve commented 2 months ago

Hello @Blayer98, wine: Call from 00006FFFFFFA2DC8 to unimplemented function KERNEL32.dll.CopyFile2, aborting looks like the line of interest from your Proton log.

Blayer98 commented 2 months ago

Ok, that’s very weird, does Wine not have KERNEL32 fully implemented? If so then I’m not sure if any potential fixes for this are added into the branch of Wine included with Proton or one not connected to it?

Blayer98 commented 2 months ago

I wanted to also mention about some more issues I found while using the application, I decided not to initially include them in as I wanted the main focus to be on Linux generally and the saving issue for plugins, which seems to be happening every time you attempt to save one.

Blayer98 commented 2 months ago

Just another addition regarding the use of CK on Steam Deck, it seems only 8-9GB of Starfield.esm can be loaded until the Steam Deck freezes and a hard reboot is required. Otherwise with only DefaultWorld usable and editable, 3-4GB is in use. Obviously this is a hardware issue, nothing to do with Proton, but I figured I’d mention it here as I’m sure people will try running the CK on less than minimum requirements like 16GB.

ManApart commented 2 months ago

I'm experiencing the same issue with crashes on save, so I appreciate the issue creation.

Fwiw, here's the proton db entry for this app, which includes the problem definition and related user specs from a number of people, including myself.

I loved using the TES creation kits back in the days when I was a windows user, and so I'm really hoping people are able to figure out the linux specific issues so I can use the SF CK on my linux box!

Blayer98 commented 2 months ago

Just thought I’d pop back on and say that it is possible to load Starfield.esm on Steam Deck, but you need to increase the swapfile (stored at home/) to around 8GB or more (More would be much better). Here’s some instructions on that: https://www.reddit.com/r/SteamDeck/s/wjBwGHmjXp

You don’t need to disable the readonly mode in SteamOS either from my own testing, so that step can be ignored.

Blayer98 commented 2 months ago

Another update: I checked the Skyrim Special Edition Creation Kit and found that saving appears to work just fine, overwriting also works fine, and the plugin's name show up in the title bar. Loading and unloading the plugin worked there too, so there's a chance Starfield's CK does something different when saving plugins since the KERNEL32.CopyFile2 unimplemented function message did not show up in the log I generated for Skyrim's CK.

ManApart commented 2 months ago

In the starfield discord, someone said that they have it working after copying files into winecfg:

I have been able to use Creation Kit fine on Linux in Proton. You need to add the dll files in your Creation Kit root to winecfg libraries as native, built-in for full function of Creation Kit. I noticed this originally when using Fallout and Skyrim's Creation Kit.

I'm attempting to replicate that by going to the CK folder, running winecfg, and adding the each of the DLL names from the Starfield folder. (I have no idea if that's the correct way to do this). image

ManApart commented 2 months ago

Running protontricks -c winecfg 1716740 to attempt to do winecfg specific to the proton game gives me the error Invalid file magic number. The appinfo.vdf version might not be supported by the current version of Protontricks - please check for updates..

$ protontricks -V
protontricks (1.11.1)
Blayer98 commented 2 months ago

Running protontricks -c winecfg 1716740 to attempt to do winecfg specific to the proton game gives me the error Invalid file magic number. The appinfo.vdf version might not be supported by the current version of Protontricks - please check for updates..

$ protontricks -V
protontricks (1.11.1)

Are you not running Creation kit through Steam? I would have done these steps on the Creation Kit’s ID, not Starfield’s ID. Also does this fix the issue regarding saving? The issue @kisak-valve saw in my proton log was that KERNEL32.dll.CopyFile2 was unimplemented.

Blayer98 commented 2 months ago

Even with the winecfg additions, I'm still getting the same error and crash:

wine: Call from 00006FFFFFFA2DC8 to unimplemented function KERNEL32.dll.CopyFile2, aborting

Someone would need to implement Kernel32's CopyFile2 function it seems and I'm not sure if any other games use this command.

Here's the Proton log from this session: steam-2722710.log

On looking up CopyFile2, it seems it was a new addition in Windows 8 onwards according to this post: https://stackoverflow.com/questions/66820467/error-copyfile2-could-not-be-located-in-the-dynamic-link-library-kernel32-dll-af I guess this explains why it wasn't implemented yet because it was only added recently.

ozoak commented 2 months ago

By no means do I know what I'm doing with Wine or Proton, but from searching...

CopyFile2 was added to Wine in 9.3, Feb 2024:

https://gitlab.winehq.org/wine/wine/-/releases/wine-9.3

"Bugs fixed in 9.3 (total 23): #55897 cpython 3.12.0 crashes due to unimplemented CopyFile2"

"Changes since 9.2: Kartavya Vashishtha (1): kernelbase: Implement CopyFile2()."

The approved & merged fix referenced for the above linked bug: https://gitlab.winehq.org/wine/wine/-/merge_requests/5020 https://source.winehq.org/git/wine.git/commit/1e348427994e5675ded3b1540a15a8af85cc8ebc

Now, right this minute, I may not know what to do with all that, however it looks like the work toward a resolution has already been done. Does that help someone with more current/advanced knowledge?

ManApart commented 2 months ago

Are you not running Creation kit through Steam? I would have done these steps on the Creation Kit’s ID, not Starfield’s ID.

Yes, I'm running the CK through Steam. I had tried both SF and SF CK and just happened to copy the wrong id into the post above. Both apps give me the same error.

Ozoak, that's great to hear! Hopefully it's just a matter of time!

Blayer98 commented 2 months ago

That’s great that it’s been implemented! I’m not sure when Valve decides to update Wine however. Currently Wine according to winecfg is 9.0.

According to the GitLab release dates, Wine 9.3 released on 23rd February while 9.0 released on 16th January. (Funny enough, Wine is already at 9.12 from 2 weeks ago lol)

From looking at Proton’s changelogs, Wine seems to get updated with every new major Proton version: Proton 7.0-1 updated Wine to 7.0. Proton 8.0-1 updated Wine to 8.0. Proton 9.0-1 updated Wine to 9.0.

Based on this, it could be a while before this one fix gets added into Proton, although I could be completely wrong lol.

I just saw that Proton 9.0-1 released in May 2nd, so around 2 months ago from when Wine 9.3 released.

Blayer98 commented 2 months ago

Are you not running Creation kit through Steam? I would have done these steps on the Creation Kit’s ID, not Starfield’s ID.

Yes, I'm running the CK through Steam. I had tried both SF and SF CK and just happened to copy the wrong id into the post above. Both apps give me the same error.

Ozoak, that's great to hear! Hopefully it's just a matter of time!

That’s odd, I use the version of Protontricks from Discover that launches it with -gui, but I haven’t seen that error before… I wouldn’t know why that’s happening sadly :(

robotman40 commented 2 months ago

Hello @Blayer98, wine: Call from 00006FFFFFFA2DC8 to unimplemented function KERNEL32.dll.CopyFile2, aborting looks like the line of interest from your Proton log.

I thought this was implemented awhile ago due to a bug with the shutil library in the Windows version of Python 3.12

Blayer98 commented 2 months ago

Hello @Blayer98, wine: Call from 00006FFFFFFA2DC8 to unimplemented function KERNEL32.dll.CopyFile2, aborting looks like the line of interest from your Proton log.

I thought this was implemented awhile ago due to a bug with the shutil library in the Windows version of Python 3.12

The fix was added into Wine 9.3, but Wine in Proton is still at 9.0.

ManApart commented 2 months ago

FWIW I tried running ptorontricks from discover, specifically a new flathub install, and I get the same error.

That said, it's probably off topic of the current issue, but just posting here for max info. FWIW I was hoping to try to add all the DLs in the starfield folder to the protontricks for the CK just to vet the rumor that that makes it work...

Protontricks was closed due to the following error:

Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/protontricks/cli/util.py", line 159, in wrapper
    return cli_func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/cli/main.py", line 277, in main
    proton_app = find_proton_app(
                 ^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/steam.py", line 848, in find_proton_app
    tool_app = find_steam_compat_tool_app(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/steam.py", line 609, in find_steam_compat_tool_app
    appinfo_sections = [
                       ^
  File "/app/lib/python3.11/site-packages/protontricks/steam.py", line 609, in <listcomp>
    appinfo_sections = [
                       ^
  File "/app/lib/python3.11/site-packages/protontricks/steam.py", line 531, in iter_appinfo_sections
    raise SyntaxError(
SyntaxError: Invalid file magic number. The appinfo.vdf version might not be supported by the current version of Protontricks - please check for updates.

=============

Please include this entire error message when making a bug report.
Log messages:

Running inside Flatpak sandbox, version 1.14.6.
Found Steam directory at /home/user/.steam/debian-installation
Using default Steam Runtime at /home/user/.steam/debian-installation/ubuntu12_32/steam-runtime
WINETRICKS environment variable is not available. Searching from $PATH.
Found 2 Steam library folders
Multiple compatdata directories found for app 1167630
Multiple compatdata directories found for app 1172470
Multiple compatdata directories found for app 584400
Multiple compatdata directories found for app 383980
Multiple compatdata directories found for app 1817070
Currently logged-in Steam user: 
Found 1 Steam shortcuts running using Steam compatibility tools
Using 'yad' as GUI provider
ManApart commented 2 months ago

With steam closed, I attempted to run the CK with WINEDLLOVERRIDES set for all the DLLs in the starfield folder:

WINEDLLOVERRIDES="bink2w64,DejaInsight.x64,flowchartx64,GFSDK_Aftermath_Lib.x64,libcrypto-1_1-x64,libeay32,libmysql,libssl-1_1-x64,libxess,NRD,NvLowLatencyVk,nvngx_dlss,nvngx_dlssg,nvngx_dlss_overridden,Qt5Core,Qt5Gui,Qt5Network,Qt5OpenGL,Qt5Sql,Qt5Svg,Qt5Widgets,QtAdvancedDocking,sfse_1_12_36,sl.common,sl.dlss,sl.dlss_g,sl.interposer,sl.nis,sl.nrd,sl.reflex,ssce5564,ssleay32,steam_api64,vcruntime140_1,WinPixEventRuntime,XCurl=n,b" steam steam://rungameid/2722710

I see a number of logs in the terminal output that indicate it's using those DLLs: File 'Z:\mnt\extradrive1\SteamLibrary\steamapps\common\Starfield\/sl.reflex.dll' is signed by NVIDIA and the signature was verified.

Without loading all the game files, I try to save an esp.

I see the same unimplemented function: wine: Call from 0000000170062128 to unimplemented function KERNEL32.dll.CopyFile2, aborting

I see a crash message that seems smushed with other logs:

Caching cursor image for , serial 13908, cache size = 9
CRASH (UNKNOWN ERROR:)Game 2722710 created interface STEAMAPPLIST_INTERFACE_VERSION001 / AppList
Game 2722710 created interface STEAMAPPS_INTERFACE_VERSION008 / Apps
Blayer98 commented 2 months ago

The saving issue seems to have been fixed as of 31st July, the experimental-9.0 branch has implemented CopyFile2, and the changelog mentions this fix. I haven’t yet tested this out but the CK should now be able to save properly.

Blayer98 commented 2 months ago

Can confirm, the saving issue has been fixed and works on Steam Deck. The only issue now with Experimental compared to older versions is that the editor stays on a black screen longer than Proton 8, but this should hopefully be in the logs already which were run on Proton Experimental. :)

ManApart commented 2 months ago

@Blayer98 , did you do anything specific to get it to work?

I made sure I was on proton experimental, verified files, and tried with no args, as well as the list of winedll overrides and in both cases still see the CK crash right after it seems to load up all the initial windows.

Blayer98 commented 2 months ago

@Blayer98 , did you do anything specific to get it to work?

I made sure I was on proton experimental, verified files, and tried with no args, as well as the list of winedll overrides and in both cases still see the CK crash right after it seems to load up all the initial windows.

I didn’t no, I left the CK installed on my Steam Deck, and I booted it back up a day ago and simply updated Proton Experimental which was already assigned onto the CK. :)

ozoak commented 2 months ago

@Blayer98 , did you do anything specific to get it to work?

I made sure I was on proton experimental, verified files, and tried with no args, as well as the list of winedll overrides and in both cases still see the CK crash right after it seems to load up all the initial windows.

I've installed Mint 22, clean installed Steam, Starfield and the CK (and purged all prefix/compatdata), set to Proton Experimental, and still crash just after launch.

It might be that the differentiating component is the graphics drivers - I've got a Turing NV GPU (2070S). I analysed the proton debug log on v8 (where it crashes on save, but does load into the editor) vs the experimental debug, and I found a point of difference which was an issue which I resolved (the NV driver install had given me a second "unknown display" which was causing issues), but it still crashes shortly after loading all screens in. And I'm just not familiar with all the components (dx, vulkan, wine, proton, qt) and what is/isn't accepted 'warn' events in the log to know where to focus.

steam-2722710.log Given this issue was created specifically to not being able to save and appears it might be resolved, I should create a new issue I think.

(proton log attached for what it's worth)

Blayer98 commented 2 months ago

It’s fine, just post any new issues inside this one otherwise the issues page gets cluttered with duplicates lol

Just double checking, is the log you’ve uploaded the one with the crashing upon application load?

ozoak commented 2 months ago

It’s fine, just post any new issues inside this one otherwise the issues page gets cluttered with duplicates lol

Just double checking, is the log you’ve uploaded the one with the crashing upon application load?

Fair enough. And yep, that was the log from crash on load using experimental.

This appears to be the exception that brings it down:

11586.673:0124:0250:info:vkd3d-proton:dxgi_vk_swap_chain_init_sleep_state: Timer interval is 1.0 ms.
11586.673:0124:0250:warn:seh:dispatch_exception backtrace: --- Exception 0xc0000005.
11586.673:0124:0250:trace:seh:dispatch_exception code=c0000005 flags=0 addr=00006FFFF77ED61C ip=6ffff77ed61c
11586.673:0124:0250:trace:seh:dispatch_exception  info[0]=0000000000000001
11586.673:0124:0250:trace:seh:dispatch_exception  info[1]=0000000000000014
11586.673:0124:0250:warn:seh:dispatch_exception EXCEPTION_ACCESS_VIOLATION exception (code=c0000005) raised
Blayer98 commented 2 months ago

I did notice this as well: proton:d3d12_pipeline_library_load_pipeline: Pipeline "Pipeline-34091305481" does not exist.

these Pipeline errors are constant in your log, and I don’t have this at all in mine…

Blayer98 commented 2 months ago

Here's my logs for Proton Experimental & Proton 8:

Proton8-StarfieldCK.log ProtonEXP-StarfieldCK.log

@kisak-valve is there anything you can identify from these logs that are causing the hang upon quitting the program or the windows to stay black and not show anything for longer?

ozoak commented 2 months ago

I did notice this as well: proton:d3d12_pipeline_library_load_pipeline: Pipeline "Pipeline-34091305481" does not exist.

these Pipeline errors are constant in your log, and I don’t have this at all in mine…

Yeah, I noticed those, so many. Though execution continues. However d3d12core.dll is the first dll in the backtrace, so maybe that makes sense.

ManApart commented 2 months ago

FWIW Here's my proton experimental log as well:

steam-2722710.log

ManApart commented 1 month ago

Just launched the new patch that came with vehicles. Experimental: Same issue as before. 8.0-5: Same issue as before.

ManApart commented 6 days ago

Still seeing the same behavior after updating to Shattered Space.