Skip to content

StarMap crashes when restarting the game via the built in RequiresRestartPopup.Create #35

@r11b22

Description

@r11b22

The problem

The game crashes when calling RequiresRestartPopup.Create(null) and pressing Restart Now.

Versions

  • StarMap 0.3.1
  • KSA v2025.11.8.2847

Error

2025-11-23 20:29:00 DEBUG Shutting down application
StarMap - Running Starmap in solo mode!
StarMap - Please fill the StarMapConfig.json and restart the program
Unhandled exception. System.UnauthorizedAccessException: Access to the path 'C:\Program Files\Kitten Space Agency\StarMapConfig.json' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.File.WriteToFile(String path, FileMode mode, ReadOnlySpan`1 contents, Encoding encoding)
   at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   at StarMap.Types.LoaderConfig.TryLoadConfig()
   at StarMap.Program.SoleModeInner()
   at StarMap.Program.Main(String[] args)

What could be the problem

The current path is set to the KSA directory but when restarting it restarts StarMap from that directory instead of the StarMap directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions