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

'The type initializer for 'CoolPropPINVOKE' threw an exception.' #39

Open
kurupt44 opened this issue Aug 21, 2022 · 6 comments
Open

'The type initializer for 'CoolPropPINVOKE' threw an exception.' #39

kurupt44 opened this issue Aug 21, 2022 · 6 comments

Comments

@kurupt44
Copy link

kurupt44 commented Aug 21, 2022

Hello,

Thince few days I have this exception when I test my soft :

System.TypeInitializationException : 'The type initializer for 'CoolPropPINVOKE' threw an exception.'
1/2 : TypeInitializationException : The type initializer for 'SWIGExceptionHelper' threw an exception.
2/2 : BadImageFormatException : Tentative de chargement d’un programme de format incorrect. (0x8007000B)

This exception appear during test but is not exactly during a coolprop calcul.

Thank you,

@Attemainio
Copy link
Contributor

Attemainio commented Dec 19, 2022

Hello,

I have the same issue with this. Also, I cannot find symbols for debugging. .pdb file is missing from the assembly. I have tried to build my solution with different frameworks and to 32-bit and 64-bit versions with no luck.

EDIT: I decompiled the code and found this from the DoubleVector.cs class:
image

EDIT 2:
I think the issues is that this DoubleVector.cs class do not handle Environment.Is64BitProcess. Am I correct?

If this helps?
image

@MadsKirkFoged
Copy link
Owner

You are correct that DoubleVector.cs did not handle 64Bit.
I have accepted your commit - Can you test if you still get the error after the update?

@Attemainio
Copy link
Contributor

I use the Nuget package of this repostory. Is it possible to create a new Nuget so I can test the validity of the function?

@MadsKirkFoged
Copy link
Owner

Nugets are automatic created when the code is being updated:
It should be out:
https://www.nuget.org/packages/SharpFluids/3.0.306

@Attemainio
Copy link
Contributor

Thank you! :) It works perfectly!

@Attemainio
Copy link
Contributor

This issue has been resolved

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