maharmstone / btrfs

WinBtrfs - an open-source btrfs driver for Windows
GNU Lesser General Public License v3.0
5.83k stars 225 forks source link

Games Crash, or don't launch #261

Closed Chaython closed 4 years ago

Chaython commented 4 years ago

Total War Games crash after Splash, likely an issue of their engine and nothing you can do about it. {(but you've done amazing at wrapping other things) Obviously a niche of a niche. Games Tested: Total War Warhammer [Crash after spalsh] Total War Three Kingdoms [Crash after spalsh] Rome Total War Gold [Steam Hung - Crashed btrfs - explorer - system - after reboot the game dir became 0bytes, no files written - launched steam it recovered the files immediately - opened game dir, files written, bytes accurate, explorer hangs - btrfs crash - system hangs - reset, delete download folder/acf files as to not get stuck in btrfs crash loop] They work when installed on other partitions. Sega support was of no help at all[as expected]. On a side note first copy attempt via steam [move game from another partition to btrfs fails, however then manually copying the game over is succesfull] so perhaps there's just file corruption along the way...

maharmstone commented 4 years ago

Thanks. I couldn't replicate this - I tried with two of the Total War games I apparently own on Steam (Rome and Medieval), and they both appeared to work alright, so it's probably not the case that the engine is doing something unexpected.

I suspect the root cause is corruption - what does btrfs check say on Linux? I'm presuming you've already verified your installations on Steam - did that redownload anything?

Chaython commented 4 years ago

Rome kept corrupting, however the other 2 are fully intact. For some reason three kingdoms is missing BTRFS properties when opening the folder's properties.

Thinking it may be a compression issue: In the BTRFS properties tab deselecting compress does nothing. Further disabling compress in regedit, copying a directory and deselecting compress in properties, created a compressed copy anyways [it was recompressing, as slow copy speed, high cpu usage] I tried downloading again, it again was compressing on write. image Again deselecting compress in btrfs properties didn't do anything. Perhaps this is because compression type is set to 3, however compress/force compress is 0 so it should inherently ignore type? I changed compress in regedit, several reboots ago, if it required a reboot[?] I also updated to todays release. Warhammer and Three kingdoms are much newer and use the same denuvo drm etc, maybe a limitation there. Anyways I used BTRFS for linux because 'bleeding edge" stayed for compress, on ntfs I use ms compact but compression isn't nearly as good. Here's a crash report for three kingdoms crash_report.zip and warhammer crash_report.zip

Chaython commented 4 years ago

Metro Exodus launched and would crash after the Game loaded during intro cutscenes [ you have an option to skip the intro, once the game is loaded, as soon as it was loaded enough to skip it crashed] No file corruption - if I copy it to an ntfs partition then launch it, it works fine. Not denuvo - unless it's left overs. As it's the GOG edition. MetroExodus_error_report_200603-082233.zip It too auto compressed though compression is disabled in registry.

maharmstone commented 4 years ago

Thanks. This is even more confusing - I started playing the Steam version of Metro Exodus a few weeks ago, and it was fine. (Well, it was horrendously slow, I think due to Denuvo doing something nefarious, but it didn't crash.) Could you give me the make and model of your hard disk please?

For compression, I suspect that you have the compression checkbox ticked for F:\Games\steamapps, and/or its downloading subdirectory. Try unticking that.

Chaython commented 4 years ago

Ya \games\ was set to compress. Is there anyway to force uncompress? Deselecting compression on the folder/file doesn't uncompress unless I deselect on all parent folders and each file individually, overwriting the files with non compressed ones recompresses. Need to boot into linux and use "btrfs filesystem defrag"? The drive is ASX8200NP-960GT-C

maharmstone commented 4 years ago

I think that once the flag is set on the parent directory, if you create a copy of the children within it the copies won't be compressed.

I wonder if your crashes might be due to a sector size issue. I had to work around a similar issue in Dreamfall a while back, where its sound engine would crash because it naively assumed that hard disks would only ever have 512-byte sectors.

ticpu commented 4 years ago

I can confirm having the same problem with another Unity game, Ultimate Chicken Horse for example. I did copy the file on NTFS and it worked just fine, then I tries creating a new folder with compression unchecked, copied the content, and the game started no problem thereafter.

I'll have to take a deeper look in whatever is causing that, but it sure seems to be related to the fact it can't get the right file size. Is it because WinBtrfs reports compressed file size by default? On Linux, there's a special ioctl to get compressed file size instead, all normal commands just report the normal file size.

GeorgeGhost commented 4 years ago

I've ran into that issue too with HITMAN 2, I had the /games/ subvolume compressed, I moved it to the uncompressed subvolume on linux and that solved the issue.

maharmstone commented 4 years ago

Thanks all for your help in sorting this - it was indeed an issue with decompression. When memory mapping - such as when loading an EXE - Windows sometimes likes to use dummy pages, which was confusing the compression libraries.

Fixed by https://github.com/maharmstone/btrfs/commit/62dc49a066643c67eb5ebf54c195f60d81b23e1c

itsTyrion commented 3 years ago

Thanks all for your help in sorting this - it was indeed an issue with decompression. When memory mapping - such as when loading an EXE - Windows sometimes likes to use dummy pages, which was confusing the compression libraries.

Fixed by 62dc49a

So you can now use FS compression without games crapping themselves?

maharmstone commented 3 years ago

That's right