none
mscorsvw repeatedly encounters missing file error RRS feed

  • Question

  • My machine is running Win XP SP2 with .NET 2.0. Immediately after a recent (and long overdue) Windows Update, my machine started beeping once every ~20 minutes while idle. Process Monitor reveals the beep (exclamation.wav) occurs after a flurry of mscorsvw.exe activity. My Windows Update included SP1 for .NET 1.1 (kb953297) and SP1 for .NET 2.0 (kb953300).

    I learned by reading a blog by David Notario that mscorsvw.exe. precompiles .NET assemblies (NGEN images) when computer is idle. Apparently, mscorsvw was introduced in one of the above referenced SP's, and it's experiencing some sort of error. Unfortunately, there's no indication of the error in the Windows GUI, but Notario describes a way to force mscorsvw to process all pending work: ngen.exe executequeueditems.

    When I run this command, a beep occurs promptly with a warning pop-up: "adui18res.dll not found". If I click OK, the pop-up returns, forever. OK, so now I know the error that is causing the beep. For additional clues, I refer to the DOS window, still active from the ngen command, where an activity log is displayed. The last line before it hangs is "Compiling assemby C:/.../AutoCAD 2005/AcLayer.dll". Now the source of the error is revealed.

    I checked, and adui18res.dll is located in the AutoCAD 2005 folder, where it's supposed to be. I emailed a friend who still runs AutoCAD 2005 and adui18res.dll is in the same folder, and none other.

    Until I find a resolution for this, mscorsvw.exe cannot complete processing the pre-compile queue, and I will be forever nagged by that bleeping beep!

    Can someone here please help me with this problem?
    • Edited by ginahoy Sunday, March 14, 2010 7:05 PM provide additional information
    Sunday, March 14, 2010 7:11 AM

Answers

  • The ngen logs confirm your information. It looks like ngening AcLayer.dll is the problem.

    Re: please clarify if <AcLayer.dll> the assembly name I need to uninstall:
    Correct, I meant to uninstall the ngen image for AcLayer.dll. That should hopefully remove it from the ngen queue and it should not trouble you anymore. However, I don't know if it will work and I don't know if it won't break AutoCAD completely. So please be aware that this is a risky thing to do on your computer.
    If you run this, check out what the command response is. If the assembly is not a root, it won't be uninstalled/removed from the queue, and you will have to find out which other assembly has this one as dependency (and uninstall that one).

    Another option would be to use Process Monitor and see where the ngen service is looking for the file adui18res.dll. If it is not looking in the correct folder, you could temporarily put it into one of the folders it is probing. Maybe that could help ... It definitely looks less impactful than the previous option.

    Re: I still think something in last week's update session triggered the problem, perhaps in an obtuse way.
    If one of the updates was a security update of .NET 2.0, then it likely caused re-ngening all ngen images. This AcLayer.dll ngen image was likely a ticking time-bomb on your computer which will blow with any re-ngening of the image. I don't know why it didn't manifest itself this way during AutoCAD installation - maybe the AutoCAD installer didn't really ngen the image AcLayer.dll, maybe it just registered it for later (another failure in your ngen log of "Ngen.exe /delete AcLayer" - "Error: The specified assembly is not installed" suggests that).
    Also I might be completly wrong.

    -Karel

    Monday, March 15, 2010 10:16 PM
    Moderator
  • Karel, by running Process Monitor when running the NGEN executequeueditems command, I discovered that mscorsvw was looking for the missing dll in the system32 folder. I should have known!

    Once I copied adui16res.dll over to the system32 folder, the next execute command revealed another missing dll, also found in the AutoCAD directory. In all, four dll's generated an error, although I didn't bother running Process Monitor for the others.

    adui16res.dll
    acui16res.dll
    anavRes.dll
    dswhipRes.dll

    After copying the 4th dll to system32, NGEN was able to finish processing its queue and all is well!

    Interestingly, my wife's laptop, which is also running XP SP2, and has same install of AutoCAD 2005, doesn't experience this problem (and these dll's are not in her system32 folder). Perhaps the difference is that she's running .NET 3.0? If anyone is interested, I could see what happens if I install 3.0 on my system and delete these dll's from the system32 folder.

    Thanks again for your assistance!

    David Butler
    Thursday, March 18, 2010 3:33 AM

All replies

  • 1) mscorsvw.exe (the NGEN service) is not new in either of the SPs. It is present already in 2.0 RTM you had on your machine prior to the update installation.
    2) NGEN service should not beep by default like this (or at least it doesn't explicitly play any .wav files). I think that the sound is played either by OS or by some other intrusive component (like anti-virus).

    I would recommend to reinstall/repair AutoCAD 2005 as it is likely one source of your trouble.

    If you have time to look into it further, I would be insterested to find out more details why this happens on your machine. I agree that beeping might be quite annoying, so finding out why that happens might be useful for other users and for us (CLR team) to think about possible solutions in future.

    Thanks,
    -Karel
    Sunday, March 14, 2010 11:12 PM
    Moderator
  • Thanks for your reply, Karel.
    <blockquote>1) mscorsvw.exe (the NGEN service) is not new in either of the SPs. It is present already in 2.0 RTM you had on your machine prior to the update installation.</blockquote>
    There were a total of 40 updates in my recent update session, so I guess the new issue could have been caused by any one of them.

    The Process Monitor log shows that the wave file is actually called by Winlogon.exe, but it only occurs after a string of mscorsvw activity. Besides, the when I use the NGEN command, it reliably reproduces the sound along with the "file not found" error. So regardless of which process actually plays the wav, it seems reasonable that it's the result of this error.

    Before attempting to re-install AutoCAD, I was thinking about upgrading to NET 3.0 or 3.5 to see if that resolves the problem. What do you recommend? The only reason I haven't done this already is that I was worried about backwards compatibility with AutoCAD 2005. I still use AutoCAD occasionally, but not enough to justify purchasing the latest version. In general, I'm very conservative about making changes to my system. Over the years, that strategy has served me well.



    Monday, March 15, 2010 5:46 AM
  • I think that upgrading to .NET 3.0 or 3.5 is more impactful on your system than "just" reinstalling AutoCAD. Also I don't know if it will help.

    You can try another option:

    1) Make sure that AcLayer.dll is the first DLL with problems - check the 'ngen eqi' command output (shortcut for 'ngen executequeueditems'). If you are not sure how to read it, share it somewhere on the net (e.g. Windows Live SkyDrive) and post a link to it here, I'll take a look.

    2) Uninstall ngen images for the assemblies which cause the problem (run 'ngen uninstall <assembly-name>'). Ngen is just an optimization, there is a good chance that the application (AutoCAD in your case) will work also without it.

    -Karel
    Monday, March 15, 2010 7:11 AM
    Moderator
  • I just got some more info from our NGEN expert:

    Apparently we have seen this type of issue with AutoCAD on .NET Framework 4 before. However this is the first time we see it reported on .NET 2.0.
    NGEN executes DllMain of assemblies it processes and AutoCAD assemblies have some specific DLL dependencies which are not found during NGEN time (we are not sure why). Also their assemblies likely play the system beep sound when the dependencies are not found (you could probably confirm that by looking at the call stack at the time the sound is played).
    We are not sure why this didn't happen before installing your updates and why it started happening after their installation. According to our information it should happen either all the time or never (the same way before and after .NET updates installation).

    I would recommend to contact AutoCAD customer support. They might have already solution for this issue.

    -Karel
    Monday, March 15, 2010 4:36 PM
    Moderator
  • I just got some more info from our NGEN expert:

    Apparently we have seen this type of issue with AutoCAD on .NET Framework 4 before. However this is the first time we see it reported on .NET 2.0.

    Thanks, Karel. I should point out that at least two other people reported this issue here, and one of those was running .NET 2.0. The responder blew him off. See first & last messages in this thread:
    http://tinyurl.com/y9eowhz

    Yes, AcLayer.dll is the first DLL with problems. BTW, the command "ngen eqi" generates this error "failed to find dependencies of image eqi". No problem, I just use the full command. Here is the output, redirected to a text file:

    Microsoft (R) CLR Native Image Generator - Version 2.0.50727.1433
    Copyright (c) Microsoft Corporation.  All rights reserved.
        Compiling assembly C:\Program Files\AutoCAD 2005\AcLayer.dll ...

    This is where it stops and dings (and throws up missing file error).

    I don't have time to try uninstalling the assembly now, but please clarify if <AcLayer.dll> the assembly name I need to uninstall.

    I noticed that ngen creates logs and I have posted them on my website:
    http://optimalbuilding.com/files/ngen.log
    http://optimalbuilding.com/files/ngen_service.log

    I'm not sure if this makes a difference, but the two .NET service packs I mentioned in my OP were Service Pack Security Updates, not he SP's themselves. I installed .NET 2 SP1 back in Oct 2008, along with .NET 2.0.  I believe .NET 1.1 and SP1 were included in my Windows XP install (at least, they don't show up in my Update history). I still think something in last week's update session triggered the problem, perhaps in an obtuse way.

    It's been several years since I contacted AutoDesk for support... I'll have to check to see if they still provide support for AC2005. If so, I'd likely have to pay $$. I'll look into that.

    Thanks,
    David Butler
    Monday, March 15, 2010 7:43 PM
  • The ngen logs confirm your information. It looks like ngening AcLayer.dll is the problem.

    Re: please clarify if <AcLayer.dll> the assembly name I need to uninstall:
    Correct, I meant to uninstall the ngen image for AcLayer.dll. That should hopefully remove it from the ngen queue and it should not trouble you anymore. However, I don't know if it will work and I don't know if it won't break AutoCAD completely. So please be aware that this is a risky thing to do on your computer.
    If you run this, check out what the command response is. If the assembly is not a root, it won't be uninstalled/removed from the queue, and you will have to find out which other assembly has this one as dependency (and uninstall that one).

    Another option would be to use Process Monitor and see where the ngen service is looking for the file adui18res.dll. If it is not looking in the correct folder, you could temporarily put it into one of the folders it is probing. Maybe that could help ... It definitely looks less impactful than the previous option.

    Re: I still think something in last week's update session triggered the problem, perhaps in an obtuse way.
    If one of the updates was a security update of .NET 2.0, then it likely caused re-ngening all ngen images. This AcLayer.dll ngen image was likely a ticking time-bomb on your computer which will blow with any re-ngening of the image. I don't know why it didn't manifest itself this way during AutoCAD installation - maybe the AutoCAD installer didn't really ngen the image AcLayer.dll, maybe it just registered it for later (another failure in your ngen log of "Ngen.exe /delete AcLayer" - "Error: The specified assembly is not installed" suggests that).
    Also I might be completly wrong.

    -Karel

    Monday, March 15, 2010 10:16 PM
    Moderator
  • Thanks! I will capture another Process Monitor log tomorrow when my computer is idle. I didn't think about looking for the target path in that way. Copying adui16res.dll to that directory would certainly be the simplest fix.

    With my very limited (but growing) understanding of NGEN, your theory seems reasonable. I think what this suggests is that because AcLayer was registered to be compiled later, the dependency error was suppressed at installation.

    If I do end up trying to uninstall the image, I will backup my drive (Acronis True Image) in case it breaks AutoCad.

    Let me ask you this. Since NGEN is simply an optimization service, presumably this same dependency error could manifest when using AutoCAD if NGEN has yet to pre-compile the assembly, correct? Perhaps the subject assembly supports a feature I've never used, which would not be surprising given that I've only used the program a few hours since installing it on this system. So it sounds like the risk of removing the assembly from the NGEN queue is that it simply puts off the problem until AutoCAD calls the assembly, which may be never. I may be using the wrong terminology, but is my thesis correct?
    Tuesday, March 16, 2010 6:26 AM
  • NGEN is running on background as a service. If application needs an assembly which is not yet ngen'd (pre-compiled), it will simply use the original assembly and fall back to JIT. Therefore AutoCAD might actually use that assembly without realizing that the ngen image is not used (because it doesn't exist). It is an additional optimization, if it is not there, no harm done.

    BTW: You don't have to wait for your computer to go idle. Just run 'ngen executequeueditems' command like before. You can easily filter out the Process Monitor log showing only access to adui18res.dll file.

    -Karel

    Tuesday, March 16, 2010 6:37 AM
    Moderator
  • Karel, by running Process Monitor when running the NGEN executequeueditems command, I discovered that mscorsvw was looking for the missing dll in the system32 folder. I should have known!

    Once I copied adui16res.dll over to the system32 folder, the next execute command revealed another missing dll, also found in the AutoCAD directory. In all, four dll's generated an error, although I didn't bother running Process Monitor for the others.

    adui16res.dll
    acui16res.dll
    anavRes.dll
    dswhipRes.dll

    After copying the 4th dll to system32, NGEN was able to finish processing its queue and all is well!

    Interestingly, my wife's laptop, which is also running XP SP2, and has same install of AutoCAD 2005, doesn't experience this problem (and these dll's are not in her system32 folder). Perhaps the difference is that she's running .NET 3.0? If anyone is interested, I could see what happens if I install 3.0 on my system and delete these dll's from the system32 folder.

    Thanks again for your assistance!

    David Butler
    Thursday, March 18, 2010 3:33 AM
  • I am glad to hear that you were able to resolve your issue.
    Note that you most likely can safly delete the DLLs from System32 immediately. IMO they were needed only for ngening.

    I don't know what is the difference between your 2 machines. I don't think that installing 3.0 on your machine will help anyone to understand what exactly happened. Because we have seen similar problems with AutoCAD and AutoDesk is aware of them (according to my information), I'd consider this resolved on .NET Framework side for now (unless we get report from AutoDesk about "real" ngen misbehavior/bug).

    -Karel
    Thursday, March 18, 2010 3:42 PM
    Moderator
  • 1) mscorsvw.exe (the NGEN service) is not new in either of the SPs. It is present already in 2.0 RTM you had on your machine prior to the update installation.
    2) NGEN service should not beep by default like this (or at least it doesn't explicitly play any .wav files). I think that the sound is played either by OS or by some other intrusive component (like anti-virus).

    I would recommend to reinstall/repair AutoCAD 2005 as it is likely one source of your trouble.

    If you have time to look into it further, I would be insterested to find out more details why this happens on your machine. I agree that beeping might be quite annoying, so finding out why that happens might be useful for other users and for us (CLR team) to think about possible solutions in future.

    Thanks,
    -Karel

    Thanks for your sharing! It is exactly what I need.
    Saturday, February 19, 2011 12:14 AM