Skip to content

[UNSTABLE] Can't launch barotrauma. That's the bug. #16071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
Regalis11 opened this issue May 14, 2025 · 4 comments
Open
1 of 2 tasks

[UNSTABLE] Can't launch barotrauma. That's the bug. #16071

Regalis11 opened this issue May 14, 2025 · 4 comments
Assignees
Labels
Bug Something isn't working Code Programming task Crash Some issue that causes the game to crash. Severe An issue that causes severe problems and occurs consistently/frequently

Comments

@Regalis11
Copy link
Collaborator

Discussed in #16068

Originally posted by ubertpendragon May 13, 2025

Disclaimers

  • I have searched the issue tracker to check if the issue has already been reported.
  • My issue happened while using mods.

What happened?

I don't have a crash log or anything. It just doesn't launch

Reproduction steps

  1. Try launching Barotrauma [Unstable]
  2. Can't

Bug prevalence

Just once

Single player or multiplayer?

Single player

-

No response

Version

v1.9.0.0 (Unstable)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

@Regalis11 Regalis11 added Bug Something isn't working Code Programming task Crash Some issue that causes the game to crash. Severe An issue that causes severe problems and occurs consistently/frequently labels May 14, 2025
@Regalis11 Regalis11 self-assigned this May 14, 2025
@Regalis11
Copy link
Collaborator Author

Fixed in https://github.com/FakeFishGames/Barotrauma-development/commit/89ac7272155ac4677883489d0a85b25e04a85d7a and updated the unstable build. Should still be tested on Mac and Linux.

@Jasontti Jasontti self-assigned this May 15, 2025
@Jasontti
Copy link
Collaborator

Tested on steam unstable branch, linux and mac

No issues on linux

Mac gives many errors that are similar, but doesn't cause a crash and was able to launch rounds in SP and MP

Cannot copy "/Users/joonasle/Library/Application Support/Steam/steamapps/workshop/content/602960/2559634234/Binary/System.Resources.Reader.dll" to "/Users/joonasle/Documents/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2559634234/Binary/System.Resources.Reader.dll": unauthorized access. The file/folder might be read-only! {Access to the path '/Users/joonasle/Documents/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2559634234/Binary/System.Resources.Reader.dll' is denied.}
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at [System.IO](http://system.io/).FileSystem.TryCloneFile(String sourceFullPath, String destFullPath, Boolean overwrite, Boolean& cloned)
   at [System.IO](http://system.io/).FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at [Barotrauma.IO](http://barotrauma.io/).File.Copy(String src, String dest, Boolean overwrite, Boolean catchUnauthorizedAccessExceptions) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\SafeIO.cs:line 447
Inner exception: Operation not permitted
Couldn't load xml document "/Users/joonasle/Documents/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2559634234/filelist.xml"! {Access to the path '/Users/joonasle/Documents/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2559634234/filelist.xml' is denied.}
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at [System.IO](http://system.io/).Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at [Barotrauma.IO](http://barotrauma.io/).File.Open(String path, FileMode mode, FileAccess access, Nullable`1 share, Boolean catchUnauthorizedAccessExceptions) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\SafeIO.cs:line 532
   at Barotrauma.XMLExtensions.TryLoadXml(String filePath, Exception& exception) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Serialization\XMLExtensions.cs:line 98
Inner exception: Operation not permitted

Image

@ilmarilahti
Copy link
Collaborator

@Jasontti I'm interested in trying this out to figure out why that happens, as I haven't seen those errors myself – was this just from running the now current unstable, from Steam?

@Jasontti
Copy link
Collaborator

@ilmarilahti Yes, just from steam. I have rider installed on that Mac and have successfully compiled DLC projects.
Did some testing and found the issue.

Notes from testing:
Old dotnet version according to dotnet --info was 6.0.31
Even though i could compile DLC project and run it without issues

Updating dotnet to 9.0.5 did not resolve warnings.

Steam uses /Users/<user>/Documents/Library/ to store workshop items. I'm not sure if this could be configured in game somehow

Seems that workshop items are automatically stored in icloud. Making library folder to be always available locally fixed things partly, but would still warn on some files.
When you launch the game, icloud sees them being accessed and does something with them, causing them to not be available for some reason.

Disabling icloud syncing for documents folder fixed the issue.

Could not find a way to exclude steams workshop folder from icloud, there might be a potential workaround with symlinking and having .nosync suffix in folders name
example found online:

mv MyFolder .MyFolder.nosync
ln -s .MyFolder.nosync MyFolder

There still is one mystery why there is a warning for accessing /Users/<use>/Library/ as it seemingly doesn't exist, maybe some iCloud thing.

I don't like disabling iCloud syncing on documents folder as a solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Code Programming task Crash Some issue that causes the game to crash. Severe An issue that causes severe problems and occurs consistently/frequently
Projects
None yet
Development

No branches or pull requests

3 participants