Skip to content

The client might crash on restart due to an occupied file #996

@SadPencil

Description

@SadPencil

Description

02.05. 14:57:28.450    ***Logfile for CnCNet Client client***
02.05. 14:57:28.453    Client version: 2026-05-02 pr/948@73874cd
02.05. 14:57:28.453    2.12.19-PullRequest0948.85+Branch.pr-948.Sha.73874cd0d621388ba249df04f446a32c13a2c000
02.05. 14:57:28.453    This is a development build of the client. Stability and reliability may not be fully guaranteed.
02.05. 14:57:28.464    Loading settings.
02.05. 14:57:28.480    Failed to load a translation file. Neither D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\bin\Debug\WindowsDX\net48\Resources\Translations\en\Yuri Theme\Translation.ini nor D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\bin\Debug\WindowsDX\net48\Resources\Translations\en\Translation.ini exist.
02.05. 14:57:28.489    Loaded translation: English
02.05. 14:57:28.499    Initializing updater.
02.05. 14:57:28.510    KABOOOOOOM!!! Info:
02.05. 14:57:28.510    Type: System.IO.IOException
02.05. 14:57:28.510    Message: The process cannot access the file 'D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\bin\Debug\WindowsDX\net48\version_u' because it is being used by another process.
02.05. 14:57:28.533    Source: mscorlib
02.05. 14:57:28.533    TargetSite.Name: WinIOError
02.05. 14:57:28.535    Stacktrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileInfo.Delete()
   at Rampastring.Tools.SafePath.DeleteFileIfExists(String[] paths) in D:\SadPencil\Documents\GitHub\xna-cncnet-client\Rampastring.XNAUI\Rampastring.Tools\SafePath.cs:line 67
   at DTAClient.Startup.Execute() in D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\Startup.cs:line 46
   at DTAClient.PreStartup.Initialize(StartupParams parameters) in D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\PreStartup.cs:line 217
   at DTAClient.Program.Main(String[] args) in D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\Program.cs:line 166
02.05. 14:57:28.537    KABOOOOOOOM

Yuri's Revenge has crashed. Error message:

The process cannot access the file 'D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\bin\Debug\WindowsDX\net48\version_u' because it is being used by another process.

A crash log has been saved to the following file: 

D:\SadPencil\Documents\GitHub\xna-cncnet-client\DXMainClient\bin\Debug\WindowsDX\net48\Client\ClientCrashLogs\ClientCrashLog_2026_05_02_14_57.txt

If the issue is repeatable, contact the YR staff at cncnet.org/discord and provide the crash log file.

XNA Client Version

2243c83

Steps To Reproduce

  1. Modify a setting in Option window
  2. When the client asks whether to restart, click yes
  3. If you are lucky enough, the restarted client will crash

Expected Behaviour

Ideally, the client should release the occupied files before restarting.

Actual Behaviour

The client restarts itself before releasing the file lock

Additional Context

No response

Checklist

  • The issue happens on the latest official version of XNA Client and wasn't fixed yet.
  • I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
  • I added a very descriptive title to this issue.
  • I used the GitHub search and read the issue list to find a similar issue and didn't find it.
  • I have attached as much information as possible (screenshots, gifs, videos, client logs, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions