files-community / Files

Building the best file manager for Windows
https://files.community
MIT License
34.06k stars 2.17k forks source link

Bug: Files crashes if startup folder is wsl directory #15772

Open ElinLiu0 opened 3 months ago

ElinLiu0 commented 3 months ago

Description

I want to call the files.exe binary directly from my WSL Ubuntu vm,it can call but will be crash. Instead of using files.exe in WSL Ubuntu vm,using explorer.exe just wokring fine as expect. Just like below:

https://github.com/files-community/Files/assets/75596885/fe2bd0aa-3931-4568-b466-a71ecc2e0d4e

Steps To Reproduce

1.Install a WSL Distro on your machine 2.Call files.exe directly in WSL Distro

Requirements

Files will be start with a called wsl path.

Files Version

3.5.0.0

Windows Version

10.0.22631.3810

Log File

N/A

Josh65-2201 commented 3 months ago

Thanks for the report,

ElinLiu0 commented 3 months ago

Thanks for the report, can you please upload (Do not copy and paste content) the debug.log file directly to GitHub (email attachments don't work) . You can get it in Files settings > About > Open log folder.

debug.log Here it is mate,the original log.Hope you guys can fix that :)

0x5bfa commented 3 months ago

Log has nothing to indicate a crash occurred.

ElinLiu0 commented 3 months ago

Log has nothing to indicate a crash occurred.

  • Could you try to find Files app from Windows logs > Application > sort by Source > .NET Runtime in Event Viewer?
  • Check if you can call Files via files.exe from command prompt

Sorry i don't understand.Where can i find Windows logs for you?

Josh65-2201 commented 3 months ago

It's in event viewer you can open that from the start menu search

ElinLiu0 commented 3 months ago

It's in event viewer you can open that from the start menu search

image Only one error i can found here.

0x5bfa commented 3 months ago

The time this exception occurred is the same when you launched the app via the alias ‘files.exe’?

ElinLiu0 commented 3 months ago

It's in event viewer you can open that from the start menu search

Also there is a lot of warnning here: image Is it matter with this issue?

ElinLiu0 commented 3 months ago

The time this exception occurred is the same when you launched the app via the alias ‘files.exe’?

Sure.

ElinLiu0 commented 3 months ago

The time this exception occurred is the same when you launched the app via the alias ‘files.exe’?

image

0x5bfa commented 3 months ago

Please also try preview version https://files.community/download

Is it matter with this issue?

No.

Qin-shihuang commented 2 months ago

The issue can be triggered as follows in Powershell:

PS C:\Users> cd \\wsl.localhost\Arch\
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Arch> files.exe .

Arch is the name of any WSL distribution.

So the issue is related to the startup directory being a WSL directory.

Files stuck at Files.App\Helpers\Application\AppLifecycleHelper.cs:140, in ConfigureHost.

ElinLiu0 commented 2 months ago

The issue can be triggered as follows in Powershell:

PS C:\Users> cd \\wsl.localhost\Arch\
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Arch> files.exe .

Arch is the name of any WSL distribution.

So the issue is related to the working directory being a WSL directory. 那这个事情就很邪门了,它能加载WSL的虚拟机文件树,但是不能在WSL中调用?😂

yaira2 commented 2 months ago

@Qin-shihuang can you navigate to the location in question if you open Files first?

Qin-shihuang commented 2 months ago

@yaira2 Yes, in that case Files works well image

yaira2 commented 2 months ago

Thank you for checking

yaira2 commented 3 weeks ago

The issue can be triggered as follows in Powershell:

PS C:\Users> cd \\wsl.localhost\Arch\
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Arch> files.exe .

Arch is the name of any WSL distribution.

So the issue is related to the startup directory being a WSL directory.

Files stuck at Files.App\Helpers\Application\AppLifecycleHelper.cs:140, in ConfigureHost.

@Qin-shihuang do you know if there is a specific service causing the issue?

Qin-shihuang commented 3 weeks ago

do you know if there is a specific service causing the issue?

I'm not sure.