-
Notifications
You must be signed in to change notification settings - Fork 254
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
System.DllNotFoundException #29
Comments
Hmm. That's an interesting one. Does it fail 100% of the time on those machines, or does it happen intermittently? dngeng.dll is a windows component, it should be located on every machine in "C:\Windows\System32\dbgeng.dll". For the machines this does not work on, can you check to see that this file exists and isn't corrupted? (Hard to check the latter but at least make sure the file isn't of 0 length.) If the file exists I would suggest trying two things:
Please let me know what you find. It's really tough for me to know what the problem is without being able to reproduce the issue myself, but if you have some time to do the above investigation I'll try to get this taken care of asap. Thanks for the bug report! |
Thanks for quick reply. Here are my findings:
Maybe the problem is not that DLL cannot be found but 'The specified procedure could not be found'? |
It looks like a path lacking in the account running RavenDB. Is there a profile created for such account? It can also be lack of rights in RavenDB account. Sent from my Windows Phone From: Paweł Pekrólmailto:notifications@github.com Thanks for quick reply. Here are my findings:
Maybe the problem is not that DLL cannot be found but 'The specified procedure could not be found'? Reply to this email directly or view it on GitHub: |
I do not see anything out of order in procmon (screen: http://1drv.ms/1GFDLb1) and the account I'm using have Administrative privileges (Win 10 x64 Pro). |
@ppekrol What happens if you try to do a File.Read on tha tpath |
I've read the dbgeng.dll without any problems using Raven.Debug
|
One last thing to try. Can you successfully run this program on the machines where this is failing? |
Here are my findings from running your code: I. Running from CMD
II. Spawning process from RavenDB WebAPI controller (Environment.Is64BitProcess returns true)
Error is: line that throws:
|
@ppekrol I would also be curious to see if it works when you set |
No good reason I guess for setting LoadUserProfile to true, will remove it, thanks! Checked with UseShellExecute = true with same results, still fails. |
I have asked a few experts around here. They said dbgcore.dll needs to be in the folder/search path. Can you check to see if that file exists in your search path? (c:\windows\system32). I don't know why it wouldn't be though... You could probably check by calling LoadLibrary("dbgcore.dll") in the test program and checking the return value against IntPtr.Zero. |
It is there, next to dbgeng.dll. This is really strange, because when I run this program from CMD then it all works. It just doesn't when I spawn process from WebAPI controller. LoadLibrary("dbgcore.dll") loads correctly. Can I assume that this message
means that the dbgeng.dll exists and is loaded correctly, but SetSymLoadError is not there (for unknown reason)? Do you have an idea why it is not working when I compile program as x64? |
Maybe it is a compact shim?
|
I found some references that says SetSymLoadError is located in dbghelp.dll. Maybe your WebAPI host exe in x64 has a PATH which include a wrong version of dbghelp.dll. You could validate this by spawning |
On my machine, I get this error:
There is a similar error here VerySleepy/verysleepy#7 (comment) With the core of the issue:
And that probably explains it. Are we (either ravendb or clrmd) packaging dbghelp? This error would only occur on specific versions of debugging tools for windows, I'm guessing. |
Haven't heard back on this one in a while, but it sounds like ayende's analysis is correct here. Please feel free to reply here if this is still an issue for you. |
Not sure if it's the same thing, but I also encountered the dbgeng exception, also on a machine running .NET 4.6.1. |
FWIW, the following code (invoked before the first code of ClrMD is called) helped me with the issue:
Essentially, when called before ClrMD's DllImport of dbgeng.dll has a chance to run, it not only loads dbgeng.dll from the Windows system directory, but also force it to look for its dependencies only there. |
Hi,
we are using ClrMD in RavenDB to get stacktraces of our process. In most cases it works properly (had some issues with .NET 4.6 but latest version resolved that problem - thanks), but on some we are getting following exception:
Not sure what is the reason and why it only happens on some machines.
I would appreciate your help/feedback.
This is how it works on our side:
https://github.com/ayende/ravendb/blob/master/Raven.Database/Server/Controllers/Admin/AdminController.cs#L857
Not sure if this can help, but on my machine I have a pretty fresh (1 month) Windows 10 Professional with VS2015 installed.
The text was updated successfully, but these errors were encountered: