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

Errors appearing after creating first project with .Net "core" 5. #35

Open
SomeProgrammerGuy opened this issue Nov 19, 2020 · 2 comments

Comments

@SomeProgrammerGuy
Copy link

Errors appearing after creating first project with .Net "core" 5.

Whilst debugging something else I am noticing a lot of errors as follows:

Exception caught: 'Isopoh.Cryptography.SecureArray.LockFailException' in Isopoh.Cryptography.SecureArray.dll ("Failed to lock 67108864 bytes into RAM. Set SecureArray.ReportMaxLockableOnLockFail=true to enable reporting. Failed to securely lock 67108864 (prevMin=204800, min=204800, prevMax=112463872, max=273539072, prevFlags=10, flags=10, prevCur=160841728, cur=160841728) bytes at 0x1324463A0D0. Error: Insufficient quota to complete the requested service..") Exception caught: 'Isopoh.Cryptography.SecureArray.LockFailException' in Isopoh.Cryptography.SecureArray.dll ("Failed to lock 67108864 bytes into RAM. Set SecureArray.ReportMaxLockableOnLockFail=true to enable reporting. Failed to securely lock 67108864 (prevMin=204800, min=204800, prevMax=112463872, max=273539072, prevFlags=10, flags=10, prevCur=160841728, cur=160841728) bytes at 0x1324463A0D0. Error: Insufficient quota to complete the requested service..")

And

Exception thrown: 'System.DllNotFoundException' in Isopoh.Cryptography.SecureArray.dll ("Unable to load DLL 'libc' or one of its dependencies: The specified module could not be found. (0x8007007E)") Exception thrown: 'System.DllNotFoundException' in Isopoh.Cryptography.SecureArray.dll ("Unable to load DLL 'libc' or one of its dependencies: The specified module could not be found. (0x8007007E)")

This is my usual Windows 10 dev machine using the latest Visual Studio.

@vocko
Copy link

vocko commented Jan 4, 2021

I have a similar issue when using the Argon2 library when calling the hash method:

Unable to load DLL 'libSystem' or one of its dependencies: The specified module could not be found. (0x8007007E)

Stack trace:

   at Isopoh.Cryptography.SecureArray.OsxNative.UnsafeNativeMethods.OsxMemset(IntPtr addr, Int32 c, UIntPtr n)
   at Isopoh.Cryptography.SecureArray.DefaultOsxSecureArrayCall.<>c.<.ctor>b__0_0(IntPtr m, UIntPtr l)
   at Isopoh.Cryptography.SecureArray.SecureArray.get_DefaultCall()

It makes me feeling like it tries to use osx libraries instead of the windows ones for some reason.

Running latest VS 2019 and project is in .NET 5.

@RafaelThome
Copy link

RafaelThome commented Oct 27, 2023

@vocko and @SomeProgrammerGuy, in the line it happens, if you are passing null or SecureArray.DefaultCall to a SecureArrayCall parameter, try passing DefaultWindowsSecureArrayCall instead.

(If you are using UWP, pass a DefaultUwpSecureArrayCall.cs).

The SecureArray.DefaultCall getter tests all Calls and selects the first that does not throw a DllNotFoundException or a TypeLoadException (not very resilient if you ask me).

I assume that in your case another exception is being thrown.

That or you seing a first chance exception or something like that.

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

No branches or pull requests

3 participants