bostrot / wsl2-distro-manager

A GUI to quickly manage your WSL2 instances
https://apps.microsoft.com/store/detail/wsl-manager/9NWS9K95NMJB
Other
1.79k stars 108 forks source link

[BUG] <crashed unexpectedly while spectify an folder> #218

Closed qinyihust closed 4 months ago

qinyihust commented 11 months ago

Is there an existing issue for this?

Current Behavior

specify a folder for default distro location, image process will crashed unexpectedly in 2 seconds, every time.

Expected Behavior

process work normally

Steps To Reproduce

  1. run WSL Distro Manager
  2. click settings button
  3. click "Default Distro Location"
  4. click folder button, select any specified folder
  5. process window disappear in 2 seconds.

Environment

- Windows Version: windows 11  family, 22H2, 22621.2283, zh-cn
- WSL Distro Manager Version: v1.8.9
- WSL Version: v1.2.5.0
- Source: GitHub releases

Anything else?

none

github-actions[bot] commented 11 months ago

Hello there! As you are a first time Issuer please read our Code of Conduct. Please also check whether your issue description is reasonable and complete. If you are having an issue always include the version you are using (WSL, this app, Windows) as well as a way to reproduce it.

LordHumphrey commented 11 months ago

Maybe not support Non-C drive?

si618 commented 11 months ago

Also crashes for me on a logical drive, but works on a separate (non-C) drive that is the primary partition. So I suspect it's not happy with logical drives in extended partitions. However, it only appears to be the folder selection dialog that crashes i.e. it works fine if I create a folder in a logical drive externally from the app and then type in the path.

Couldn't find any logs other than windows event log which showed Exception code: 0xc0000005

Spongman commented 11 months ago

crashes for me too when picking a directory on my c drive.

wohenbushuang commented 11 months ago

may be duplicated with my issue #197

HadiJadallah commented 10 months ago

Same here. 1- Crashes after selecting a new folder yet the selected folder is saved / updated in "shared_preferences.json"??

2- In shared_preferences.json, "flutter.SaveLocation":"D:\wsl2_vhdx" but "C:\WSL2-Distro" is displayed which is confusing.

dan788 commented 10 months ago

quick work around : If you just type the new folder location in the selection area then click save it works

Spongman commented 4 months ago

I don't know how's that's supposed to fix the issue.

the bug is, and remains, here: https://github.com/bostrot/wsl2-distro-manager/blob/46a356270c4ebf15ea44665039ff289a0375c994/lib/components/constants.dart#L7

it's a bug for an application to be reading, writing, or creating anything in the c:\ directory.

bostrot commented 4 months ago

I can't reproduce this after this PR. Usually C: is writable if not defined otherwise by company or personal permissions. @Spongman

Spongman commented 4 months ago

No this is false c: is only writable if you disable UAC. The Windows logo program has limited applications to only writing to allowed specified directories for decades now. Honestly I’m surprised this behavior made it past the MS store acceptance. Writing to C: is a bug.