-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Microsoft.Windows.CompatibilityPack WMI exception #27001
Comments
/cc @ericstj |
It's not the TrimUnusedDependencies property after all. Problem exists even with it as false. |
This code works on the same machine with the failure:
|
I do not understand how this callstack is possible because ptr is checked for null already, here: |
@danmosemsft Comparing IntPtr to null should not be possible as IntPtr is a struct, but perhaps the == operator comes into play some how? This feels like a compiler quirk or hack. At any rate, it always returns false, even for IntPtr.Zero. See the following code:
|
This has been discussed... https://stackoverflow.com/questions/1456861/is-intptr-zero-equivalent-to-null |
Issue logged: dotnet/corefx#31456 |
Oh! - you're right @jjxtra -- I didn't notice it was IntPtr. Yes, that's a bug. I put up a PR. You'll still have to debug, to see which export is missing. Also where it is finding wminet_utils.dll. And what is the version of that file. We find it in the .NET framework. On my machine, it is
I have .NET 4.7.2 |
Hi @jjxtra do you have more info about a repro of this issue? I suspect something went wrong with the Fx install (or its registry). |
Sadly no, the customer only said it was server 2012 standard with sql server 2014 installed. I've never seen it myself personally. I switched to using wmic in https://github.com/jjxtra/IPBan but even wmic seems to fail on some Windows 7 home editions according to my analytics... |
Thanks for looking @jjxtra - I'm closing the issue for now since it is not actionable at this moment but get back to us if you get more info on it. |
I'd like to revisit this one
When I update System.Management to latest preview version (4.6.0-preview5.19224.8), the exception changes to:
which is obviously more informative, however .NET Core is supposed to support Windows 8.1 OOTB. @pjanotti could you please give some guidance on this? |
@theimowski could you please open a new issue? It is easy to overlook contents on old ones. It doesnt surprise me this fails as we snapped WMI code from after this point. I guess they made code changes since 4.5.1 that require new exports. If you want you could debug a bit and see whether it's something minor and we could make our code tolerant of its absence. |
Sorry for open up the discussion here. |
System.Management throws a strange exception, but only on some Windows machines, other machines are just fine. Issue is here: https://stackoverflow.com/questions/50444876/type-initializer-for-system-management-wminetutilshelper-threw-an-exception...
This is in self-contained x86 Windows, .NET core 2.1, on Windows Server 2012 R2 x64. SQL 2014 also installed. Another identical server without SQL 2014 does not have the error.
Could this be related to wminet_utils.dll missing?
Any ideas where to start looking?
The text was updated successfully, but these errors were encountered: