Skip to content
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

Elin Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono) #1251

Open
1 task done
Xerxes-2 opened this issue Dec 6, 2024 · 0 comments
Open
1 task done

Comments

@Xerxes-2
Copy link

Xerxes-2 commented Dec 6, 2024

Description

When playing Elin, the game fails to delete a directory recursively during save operations, leading to an unhandled exception.

Elin is a Unity-based game running Mono as its script engine. The issue occurs when the game attempts to delete a temporary directory under C:\users\crossover\AppData\LocalLow\Lafrontier\Elin\Save\. This causes the game to hang, and manual intervention is required to delete the directory.

This appears to be related to Mono's System.IO implementation under Wine, as the error logs indicate file system operations fail during recursive directory deletion.

Unity Log (in C:\users\crossover\AppData\LocalLow\Lafrontier\Elin\Player.log):

Exception:System.IO.IOException: Unknown error (0x2604200) : '\\?\C:\users\crossover\AppData\LocalLow\Lafrontier\Elin\Save\_Temp\'
  at System.IO.FileSystem.RemoveDirectoryRecursive (System.String fullPath, Interop+Kernel32+WIN32_FIND_DATA& findData, System.Boolean topLevel) [0x00163] in <7e05db41a20b45108859fa03b97088d4>:0 
  at System.IO.FileSystem.RemoveDirectory (System.String fullPath, System.Boolean recursive) [0x00036] in <7e05db41a20b45108859fa03b97088d4>:0 
  at System.IO.DirectoryInfo.Delete (System.Boolean recursive) [0x00000] in <7e05db41a20b45108859fa03b97088d4>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Delete(bool)
  at IO.DeleteDirectory (System.String path) [0x00018] in <af2754ac36984452b76479915f27b6cf>:0 
  at Core.OnApplicationQuit () [0x00099] in <a9cf46e3abf7419aaed33882c46a12b7>:0

WINEDEBUG Log:

1044941.610:0668:066c:trace:file:NtQueryDirectoryFile => 0x80000006 (0)
1044941.610:0668:066c:Ret  ntdll.NtQueryDirectoryFile() retval=80000006 ret=7b01a3cd
1044941.610:0668:066c:Call ntdll.RtlNtStatusToDosError(80000006) ret=7b01a4a0
1044941.610:0668:066c:Ret  ntdll.RtlNtStatusToDosError() retval=00000012 ret=7b01a4a0
1044941.610:0668:066c:Call ntdll.NtClose(00000b68) ret=7b0643d5
1044941.610:0668:066c:Ret  ntdll.NtClose() retval=00000000 ret=7b0643d5
1044941.610:0668:066c:Ret  KERNEL32.FindNextFileW() retval=00000000 ret=10c554a4d
1044941.610:0668:06fc:Ret  ntdll.NtDelayExecution() retval=00000000 ret=7b084d7c
1044941.610:0668:06fc:Ret  KERNEL32.Sleep() retval=00000000 ret=18143ebea
1044941.610:0668:06fc:Call KERNEL32.QueryPerformanceCounter(66e8fd18) ret=18143eb94
1044941.610:0668:06fc:Ret  KERNEL32.QueryPerformanceCounter() retval=00000001 ret=18143eb94
1044941.610:0668:06fc:Call KERNEL32.QueryPerformanceFrequency(66e8fd20) ret=18143eba3
1044941.610:0668:06fc:Ret  KERNEL32.QueryPerformanceFrequency() retval=00000001 ret=18143eba3
1044941.610:0668:06fc:Call KERNEL32.QueryPerformanceCounter(66e8fd08) ret=18143eb94
1044941.610:0668:06fc:Ret  KERNEL32.QueryPerformanceCounter() retval=00000001 ret=18143eb94
1044941.610:0668:06fc:Call KERNEL32.QueryPerformanceFrequency(66e8fd10) ret=18143eba3
1044941.610:0668:06fc:Ret  KERNEL32.QueryPerformanceFrequency() retval=00000001 ret=18143eba3
1044941.610:0668:06fc:Call KERNEL32.Sleep(0000000a) ret=18143ebea
1044941.610:0668:06fc:Call ntdll.NtDelayExecution(00000000,66e8fcb8) ret=7b084d7c
1044941.610:0668:066c:Call KERNEL32.FormatMessageW(00003200,00000000,0066c200,00000000,0010cef0,00000100,00000000) ret=10c5561e1
1044941.610:0668:066c:trace:nls:FormatMessageW (0x3200,0000000000000000,0x66c200,0x0,000000000010CEF0,256,0000000000000000)

The Mono log shows an IOException with an unknown error code (e.g., 0x2604200), while Wine logs show that directory enumeration completes successfully with STATUS_NO_MORE_FILES. The error code which originates from an unknown source, is returned to Mono, causing the failure.

Observations

  • The error code (0x2604200, 0x66c200, etc.) changes with each session but remains consistent during the game lifecycle. The two logs are from different program session so the codes are not the same.
  • The temporary directory remains empty but cannot be deleted, leading to a game hang.
  • Manually deleting the directory allows the game to proceed but causes additional issues if the exception occurs during autosave.

Steps to reproduce

  1. Create a new Windows 10 bottle in Whisky.
  2. Install Steam and download the Elin Demo.
  3. Launch the game. If characters are missing in the menu (font issue), click the top button (New Game).
  4. Create a new character and start the game.
  5. Skip the opening sequence (hold Ctrl).
  6. The game hangs during the starting dialogue when attempting to delete the temporary save directory.

Expected behaviour

The game should successfully delete the temporary directory during save operations without causing exceptions or hangs.

Workaround

Manually deleting the directory causing exception shown in Player.log allows the game to proceed. However, this is impractical for autosave scenarios and introduces bugs.

Logs###

Whisky Version: 2.3.4
Date: 2024-12-06T08:01:34Z
macOS Version: 15.1.1

Bottle Name: Isaac
Bottle URL: /Users/xerxes2/Library/Containers/com.isaacmarovitz.Whisky/Bottles/1EEEAB6A-2C77-4B83-A451-719C4E88773F

WhiskyWine Version: 2.4.5
Windows Version: win10
Enhanced Sync: msync

Metal HUD: false
Metal Trace: false

Arguments: start /unix /Users/xerxes2/Library/Containers/com.isaacmarovitz.Whisky/Bottles/1EEEAB6A-2C77-4B83-A451-719C4E88773F/drive_c/Program Files (x86)/Steam/steamapps/common/Elin/Elin.exe

Environment:
{
    "DXVK_ASYNC" = 1;
    "GST_DEBUG" = 1;
    WINEDEBUG = "fixme-all";
    WINEESYNC = 1;
    WINEMSYNC = 1;
    WINEPREFIX = "/Users/xerxes2/Library/Containers/com.isaacmarovitz.Whisky/Bottles/1EEEAB6A-2C77-4B83-A451-719C4E88773F";
}

0798:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems

What version of Whisky are you using?

2.3.4

What version of macOS are you using?

Sequoia (macOS 15.1.1)

Issue Language

  • Yes my issue is written in English
@Xerxes-2 Xerxes-2 changed the title Unable to delete temp directory in Elin when saving Game Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono on Wine) Dec 6, 2024
@Xerxes-2 Xerxes-2 changed the title Game Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono on Wine) Game Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono) Dec 6, 2024
@Xerxes-2 Xerxes-2 changed the title Game Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono) Elin Fails to Delete Temporary Directory During Save, Leading to Crash (Unity Mono) Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant