-
Notifications
You must be signed in to change notification settings - Fork 12
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
ReflectionTypeLoadException when running audio2csv #241
Comments
Thanks for the report 😄 ! There are two separate bugs here. 1The PowerShell screenshot shows a problem probably located to your locale. What country are you located in? Do you use a comma or a period (a decimal point) to separate the integer and fractional parts of a number? Can you please attach a verbose log for that case? 2For the main problem, where it is failing to load the required libraries, that's a pickle. I'm almost certain it is something to do with your computer. I'm going to make a custom build of AP.exe that will output more information to help us debug this. |
Please find attached the very verbose log file: cheers, Martin. |
If there is a ReflectionTypeLoadException there currently is no way to understand what error actually occurred. Adds better error output. Speculatively addresses #241
Hi @tinchobulen, I've created a special build of AP.exe that will provide more information about the error. Can you please download it from here https://ci.appveyor.com/api/buildjobs/91ikkc1ailtlhih3/artifacts/src%2FAnalysisPrograms%2Fbin%2FDebug.19.6.1.1.zip and make sure that version is being used in your R script. |
Hi @atruskie thank you very much for your help! please find attached the log file from R script: log file from Power Shell script. It creates 2 folders in my output direction. One named: Mixdown.wav (inside is the log file .txt and a .yml file names Towsey.Acoustic) and another names Towsey.Acoustic (empty inside) thank you again for your help! cheers, Martín |
Hi @tinchobulen, I've fixed the comma error (problem number 1) in #242. You'll see this fix in the weekly release version soon. The other problem, due to some missing files, we're dealing with here. Note: the fixes are in separate branches, and won't both be included in one version until they are both fixed. Also, it seems you used an older version of AP.exe. I am not sure what is causing the missing code problem, so the special build I linked to above contains extra code that will tell me about the problem. But it isn't fixed yet. Unless you use that version they're won't be any difference in outcome. From the log files you attached:
See how the version number is Please try downloading the linked version again. Make sure to delete any old versions of AP.exe. Then try to run again, with verbose logging, and attach logs. Thanks! |
From @tinchobulen:
The important part of the log is thus part:
I totally did not expect that 😮. I'll look into a fix. |
Fixes #241 Due to some complicated diamond dependency problems I do not really understand, there was a conflict with the version of System.Numerics.Vectors. ImageSharp required a version shipped only in .NET Standard, which we did not have access to. The only solution I could find was to move to the larest dev build of ImageSharp, which changed this dependency. This change includes app binding redirects, ImageSharp API updates, and a few tweaks to the reflection type load exception formatter so that it now outputs fusion logs. Still need to check that tests pass.
Hi @tinchobulen, I think I have fixed the problem. Unfortunately, I could never replicate the problem on my computers or servers. That means you'll need to test it for me again 😄 As before, please download this https://ci.appveyor.com/api/buildjobs/a9siwupb28my3bnk/artifacts/src%2FAnalysisPrograms%2Fbin%2FRelease.19.7.0.3.zip test version of AP.exe. It has the version number Thanks! |
Hello @atruskie I tried in my computer and unfortunately it didn't work :( Maybe its something wrong with my installation process? thank you!! |
Or maybe its a problem with my windows 7 ultimate version? I will try it in another computer. cheers, Martin. |
Hi @tinchobulen, So yeah I'm pretty confident it is something unique about your machine. I'm just not sure what it is. It is worth fixing because it might be a condition shared by more than one computer... Or it could equally be isolated to your machine. The core problem seems to be around a missing dependency that should be installed with the .NET Framework. Can I get you to tell me which .Net framework you have installed? https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed Also it would be great to try it on another computer. And after you've got the version, try installing a newer .NET Framework. Our goal was to be backwards compatible but it looks like I might have messed that up. https://www.microsoft.com/en-us/download/details.aspx?id=55170 Thanks again, |
Yes,
I have the 4.6.2 NET version installed in my computer.
today I'll try AP.exe in another pc.
cheers,
M.
El vie., 5 de jul. de 2019 a la(s) 18:10, Anthony Truskinger (
notifications@github.com) escribió:
… Hi @tinchobulen <https://github.com/tinchobulen>,
So yeah I'm pretty confident it is something unique about your machine.
I'm just not sure what it is. It is worth fixing because it might be a
condition shared by more than one computer... Or it could equally be
isolated to your machine.
The core problem seems to be around a missing dependency that should be
installed with the .NET Framework.
Can I get you to tell me which .Net framework you have installed?
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
Also it would be great to try it on another computer.
And after you've got the version, try installing a newer .NET Framework.
Our goal was to be backwards compatible but it looks like I might have
messed that up.
https://www.microsoft.com/en-us/download/details.aspx?id=55170
Thanks again,
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#241?email_source=notifications&email_token=AKLSK3Y7IY44S2RKY3QBKODP562DXA5CNFSM4H3AWWAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKKDGY#issuecomment-508862875>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLSK35WWYFZC5JEYXH7BSLP562DXANCNFSM4H3AWWAA>
.
--
Lic. Martín Boullhesen
Instituto de Ecorregiones Andinas (INECOA), UNJu-CONICET.
Canónigo Gorriti 237 -CP 4600, San Salvador de Jujuy, Argentina.
|
Hello @atruskie ! I want to let you know that finally I ran the audio2csv command! please find attached the log file (very_verbose enabled) Also, at the end of the analysis a new error pups out, when trying to make an Events CSV file. Anyway I think I have a progress here! thank you for your help. now I will start to analyze longer recordings. cheers, Martín |
Hi @tinchobulen, Glad it's working. If you ever track down the problem please let me know. I'll close this issue for now. The event file error you are referring to is not an error. Our analyses can return acoustic events, or acoustic indices, or both. Since you ran an analysis that only generates indices, AP warned you that you won't find an Events.csv file in your output folder (just in case you were expecting it). Thanks for working with me on this. If you have any more problems, please contact us again. |
…s better errors for reflection loading exceptions (#244) * Better formats reflection exceptions If there is a ReflectionTypeLoadException there currently is no way to understand what error actually occurred. Adds better error output. Speculatively addresses #241 * Bumped System.Numerics.Vectors and ImageSharp Fixes #241 Due to some complicated diamond dependency problems I do not really understand, there was a conflict with the version of System.Numerics.Vectors. ImageSharp required a version shipped only in .NET Standard, which we did not have access to. The only solution I could find was to move to the larest dev build of ImageSharp, which changed this dependency. This change includes app binding redirects, ImageSharp API updates, and a few tweaks to the reflection type load exception formatter so that it now outputs fusion logs. Still need to check that tests pass. * Fix missing SixLabors myget reference
It turns out one of our team members (@ninascarpelli) just encountered this problem! @ninascarpelli can you please use the following link and report back on which version of .NET is installed on your computer? https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed |
Hi @atruskie I've got .NET Framework 4.7.2 (QUT desktop) and 4.8 (personal laptop) and both are giving me the same error. |
Hi! thanks for sharing this with me. I'll be on alert for news about this bug. cheers. |
R is writing the command like this: C:\AP\ANALYS~1.EXE audio2csv "C:/AP/AudioData/REC05_WA/20190815_070035.WAV" "C:/AP/ConfigFiles/Towsey.Acoustic.yml" "C:/AP/outputs//REC05_WA/20190815_070035.WAV" -p and this is causing the failure. |
I've narrowed this down further:
These attributes do not seem to change, the outcome:
|
Fixes #241 When R executes AP.exe it uses the `Sys.which` function to resolve the executable name. This function uses the Windows 8.3 short-name functionality by defualt which launches the application as ANALYS~1.exe. Since the application is no longer named correctly, the AnalysisPrograms.exe.config file cannot be loaded and all of our application binding redirects are ignored. Subsequently the fusion assembly loader throws errors like: ``` System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. - Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` In addition to the stack overflow post that should how to update the current domain's App.Config file and settings, I also had to force Fusion to redo it's setup. This method, is to say the least, fragile, and we can expect it to fail in the port to .NET Core. Additionally added a AP_DEFAULT_LOG_VERBOSITY flag that set the log level verbosity before the command line is parsed. Additionally added a few extension method helpers and associated tests
- defined common props in Directory.Build.props - removed dependancy on .NET Framework and MSBuild Community Tasks and replaced git versioning tasks with a powershell script. - locked .net core to stable release in global.json to avoid a bug with FSharp project SDK not being able to parse a nuget version - Reinstalled stylecop project reference into all projects - renabled deterministic builds on FSharp projects by chaning output type to PDB - Disabled short name tests because I could not determine any valid test or faulting case that still occurs (see #241) - Removed vagrant file - soon will not be necessary
Describe the bug
AnalysisPrograms.exe does not run. I tried using R and Power Shell but did not succed
Expected behavior
To analyze a long recording of 1.1 hours in .wav format.
Diagnostics
in Power Shell:
In R:
Screenshots
PowerShell:
Rstudio:
Additional Details
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: