dvm icon indicating copy to clipboard operation
dvm copied to clipboard

Fails to install on Windows (OutOfMemoryError).

Open rjframe opened this issue 8 years ago • 5 comments

When I run the install on Windows 10 after downloading, I get an OutOfMemoryError. Memory is not a problem. DVM has not been previously installed.

The path is modified so I can type "dmd" and use tab completion to select the compiler I want without dvm, but using dub requires specifying the version (e.g., "dub --compiler=dub.2.072.0.bat").

PS C:\Users\rjfra\bin> .\dvm-0.4.4-win.exe install dvm -v
Creating paths:
    C:/Users/rjfra/AppData/Roaming/dvm
    C:/Users/rjfra/AppData/Roaming/dvm/archives
    C:/Users/rjfra/AppData/Roaming/dvm/bin
    C:/Users/rjfra/AppData/Roaming/dvm/compilers
    C:/Users/rjfra/AppData/Roaming/dvm/env
    C:/Users/rjfra/AppData/Roaming/dvm/scripts

Copying executable:
thisExePath: C:\Users\rjfra\bin\dvm-0.4.4-win.exe
    source: C:\Users\rjfra\bin\dvm-0.4.4-win.exe
    destination: C:/Users/rjfra/AppData/Roaming/dvm/bin/_dvm.exe

    source: C:\Users\rjfra\bin\dvm-0.4.4-win.exe
    destination: C:/Users/rjfra/AppData/Roaming/dvm/bin/_dvm.exe

Writing script to: C:/Users/rjfra/AppData/Roaming/dvm/bin/dvm.bat
Setting permissions:
core.exception.OutOfMemoryError@(0)
PS C:\Users\rjfra\bin> ls ..\AppData\Roaming\dvm\bin

    Directory: C:\Users\rjfra\AppData\Roaming\dvm\bin

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        11/6/2016   7:43 AM            312 dmd-2.071.0.bat
-a----        11/6/2016   7:42 AM            312 dmd-2.072.0.bat
-a----        11/6/2016   7:42 AM            312 dvm-current-dc.bat
-a----        11/6/2016   7:49 AM            621 dvm.bat
-a----        11/6/2016   7:25 AM        1347100 _dvm.exe

PS C:\Users\rjfra\bin> dvm install 2.072.0 --force
Installing: dmd-2.072.0
PS C:\Users\rjfra\bin> dvm list
Installed D compilers:

dmd-2.072.0
PS C:\Users\rjfra\bin> dvm use 2.072.0
PS C:\Users\rjfra\bin> dmd
dmd : The term 'dmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ dmd
+ ~~~
    + CategoryInfo          : ObjectNotFound: (dmd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\rjfra\bin> dmd-2.072.0.bat

rjframe avatar Nov 06 '16 13:11 rjframe

Hmm, I've not been able to reproduce this issue. But I should add that I've not tested DVM in Power Shell until now. I noticed that in the use command doesn't work in Power Shell.

jacob-carlborg avatar Nov 06 '16 14:11 jacob-carlborg

I still get the out of memory error when installing, but it does work properly with cmd.

rjframe avatar Nov 07 '16 01:11 rjframe

Adding a "dmd.bat" in the bin directory containing dvm-current-dc.bat %* solves the problem with Powershell (dvm use will work). It doesn't seem to break anything with cmd but I've only run dub on a couple of projects to test.

rjframe avatar Dec 11 '16 03:12 rjframe

What does dmd.bat contain?

jacob-carlborg avatar Dec 11 '16 11:12 jacob-carlborg

The intention of DVM is that the dmd command should point to the actual executable and not a wrapper.

jacob-carlborg avatar Dec 12 '16 08:12 jacob-carlborg