Skip to content
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

Crash on Fresh Install (mono) #225

Closed
Allcharles opened this issue Mar 11, 2019 · 8 comments
Closed

Crash on Fresh Install (mono) #225

Allcharles opened this issue Mar 11, 2019 · 8 comments

Comments

@Allcharles
Copy link
Collaborator

Describe the bug

Download of AP using download_ap.ps1 fails on a clean install of Linux Mint 18.3. When attempting to run AnalysisPrograms.exe the system crashes before any commands can be run.

Expected behavior

Should be able to use AP through mono without issue.

Diagnostics

  • Terminal Log
  • OS: Linux Mint 18.3 (Sylvia)
  • AP.exe version: 19.3.0.5 (Cannot confirm, this is output from powershell download)
  • Mono: 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
  • Powershell scripts used, script_ap.ps1 runs download_ap.ps1. Scripts
@atruskie
Copy link
Member

I think the problem here is your mono version. We require Mono 5.12 or higher. Can you update it and see if that does the trick?

atruskie added a commit that referenced this issue Mar 11, 2019
It now delays execution of a few things in AppConfigHelper so we can do more checks before crashing.

Check environment actually checks the mono version now, and multiple errors could happen as well to make the check-fix routine easier.

Intended to help dx #225
@Allcharles
Copy link
Collaborator Author

Allcharles commented Mar 11, 2019

download_ap.ps1 no longer works on Linux Mint. It now gives the following error message:

Get-Command : The term 'curl.exe' 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 /home/charles/Documents/GitHub/ap-desktop/ap/download_ap.ps1:189 char:13
+     $curl = Get-Command curl, curl.exe -CommandType Application | sel ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (curl.exe:String) [Get-Command], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

Edit: I tested, and changing the line to $curl = Get-Command curl -CommandType Application | select -First 1 does work so removing that line if the system is running linux should fix the problem, however I am unsure if this also affects mac. To determine if the system is windows I used this command: [System.Environment]::OSVersion.Platform -eq "Win32NT".

@Allcharles
Copy link
Collaborator Author

Allcharles commented Mar 11, 2019

Edit: Should be here #226
I have updated to Mono to 5.18.0.268, and am running the newest AP version 19.2.2.1. Unfortunately it still crashes, same error output with and without log level 7.
log
terminal

@Allcharles
Copy link
Collaborator Author

Allcharles commented Mar 11, 2019

Hopefully final comment on download_ap.ps1. New commit broke it from running correctly on windows PowerShell as well. I tested the command outside the script in a PowerShell terminal and it returns the same error.

Windows 10 Pro Version 10.0.17134 Build 17134
PowerShell Version 5.1.17134.590
download_ap.ps1 Version
Fails on line 207 (if (Get-Command unzip -CommandType Application) {)
Error:

Get-Command : The term 'unzip' 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 D:\Documents\GitHub\VRES\ap\download_ap.ps1:207 char:9
+     if (Get-Command unzip -CommandType Application) {
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (unzip:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

Edit:
I managed to find a command which words on both windows and linux, npm-pwsh and normal powershell. I have attached the file below, changes begin at line 203. I replaced the previous unzipping libraries with Microsoft.PowerShell.Archive\Expand-Archive however I do not know what error correction you would need to apply.

download_ap.zip

atruskie added a commit that referenced this issue Mar 11, 2019
Wild guess at addressing #225 (comment)

We're seeing problems on mono with missing assemblies.
@atruskie
Copy link
Member

A new version of download_ap.ps1 here 3d0d284


I can't reproduce this error (using mono 5.18)

I've taken a wild stab at a fix in e3317bd.

Please test again, make sure you download the artefact from AppVeyor.

@Allcharles
Copy link
Collaborator Author

Tested the new version of download_ap.ps1, now working on windows and linux mint. AP still only working on windows for me. I have attached the terminal and log output. It appears that the file system is failing to find the file "System.ComponentModel.DataAnnotations", I did a manual check for the file and there is no .dll matching that title.
log
terminal
image

Environment:
Linux Mint 18.3 (Sylvia) Cinnamon 64-bit
mono 5.18.0.268
AP 19.2.2.1

@atruskie
Copy link
Member

@Allcharles your log indicates that you are not using the latest version (build 686 from AppVeyor).

Here is a direct link: https://ci.appveyor.com/project/QUTEcoacousticsResearchGroup/audio-analysis/builds/22996165/artifacts

@atruskie
Copy link
Member

Okay so here's what I had to do to replicate this bug:

  • create a VM with linux mint
    • could not replicate with debian or ubuntu WSL distros
    • could replicate in debian VM
  • install mono
  • and then manually delete System.ComponentModel.DataAnnotations.dll out of the GAC

You must have had a screwed up install.

Regardless, the commit 64e0f98 now shows this message if we can't load this DLL:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants