wsl2-distro-manager icon indicating copy to clipboard operation
wsl2-distro-manager copied to clipboard

[BUG] <crashed unexpectedly while spectify an folder>

Open qinyihust opened this issue 1 year ago • 7 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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

qinyihust avatar Sep 14 '23 02:09 qinyihust

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.

github-actions[bot] avatar Sep 14 '23 02:09 github-actions[bot]

Maybe not support Non-C drive?

LordHumphrey avatar Sep 20 '23 03:09 LordHumphrey

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

si618 avatar Sep 20 '23 23:09 si618

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

Spongman avatar Sep 21 '23 08:09 Spongman

may be duplicated with my issue #197

wohenbushuang avatar Oct 01 '23 16:10 wohenbushuang

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.

HadiJadallah avatar Oct 15 '23 13:10 HadiJadallah

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

dan788 avatar Oct 21 '23 15:10 dan788

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.

Spongman avatar Apr 28 '24 19:04 Spongman

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

bostrot avatar Apr 28 '24 19:04 bostrot

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.

Spongman avatar Apr 29 '24 00:04 Spongman