-
Notifications
You must be signed in to change notification settings - Fork 19
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
Cannot index into a null array. #7
Comments
@jerodway, do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system. Please try these two commands from PowerShell: wsl --system -d Ubuntu -e df /mnt/wslg/distro wsl -d Ubuntu -e df / And this one from within a WSL shell session inside Ubuntu: \df / They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here. |
Well, initially I could not get the first command to work at all. After a bit of playing around with it, I sorted out that problem and then wslcompact seemed to just start working. Sorry for bothering you |
@Aldo-f , these are the lines compatible with your distro's name. Do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system. Please try these two commands from PowerShell: wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro wsl -d Ubuntu-18.04 -e df / And this one from within a WSL shell session inside Ubuntu-18.04: \df / They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here. Please. |
Not aware of any special configuration. Seems GUI support is disabled on host, don't know if that's a requirement. I could however use > wslcompact
WslCompact v8.0 2023.02.13
(C) 2023 Oscar Lopez
wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact
Distro's name: Ubuntu-18.04
Image file: C:\Users\aldo\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
Current size: 13479 MB
InvalidOperation: C:\Users\aldo\scoop\apps\wslcompact\current\wslcompact.ps1:79
Line |
79 | … $estimated = ((wsl --system -d "$wsl_distro" -e df /mnt/w …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
Estimated size: 0 +/- 0 MB
The estimated process time using an SSD is about 0 minutes.
> wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro
GUI application support is disabled via C:\Users\aldo\.wslconfig or /etc/wsl.conf.
Error code: Wsl/Service/CreateInstance/WSL_E_GUI_APPLICATIONS_DISABLED
> wsl -d Ubuntu-18.04 -e df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% / Inside WSL > \df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% /
Details of my .wslconfig (GUI disabled)
|
Thanks! Finally We know what is going on. With this info I am sure I will be able to solve the issue of size detection. |
Release 8.5 fixes the issue. Thanks for helping with it. |
Has anyone encountered this error:
PS C:\Users\rodwjam> wslcompact
WslCompact v7.0 2023.02.08
(C) 2023 Oscar Lopez
wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact
Distro's name: Ubuntu
Image file: C:\Users\canso\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
Current size: 28691 MB
Cannot index into a null array.
At C:\Users\canso\scoop\apps\wslcompact\current\wslcompact.ps1:79 char:17
Estimated size: 0 +/- 0 MB
The estimated process time using an SSD is about 0 minutes.
The text was updated successfully, but these errors were encountered: