none
Faulting module path: C:\Windows\system32\MSVCR120.dll

    Question

  • I am a software developer working with Visual C++, in Visual Studio 2013.  I have VC++ Redist 2013 installed.  I build my release version of my application, PDCalc and then try run it ON MY SYSTEM and I get:

    Faulting application name: PDCalc.exe, version: 1.0.0.1, time stamp: 0x56a8e068
    Faulting module name: MSVCR120.dll, version: 12.0.21005.1, time stamp: 0x524f7ce6
    Exception code: 0x40000015
    Fault offset: 0x000a7676
    Faulting process id: 0x18a4
    Faulting application start time: 0x01d15921920814b1
    Faulting application path: C:\Program Files (x86)\C2Software\PDCalc\PDCalc.exe
    Faulting module path: C:\Windows\system32\MSVCR120.dll
    Report Id: d147ff31-c514-11e5-b11b-f816546282f6

    In all these forums I keep seeing the questioning person be told to uninstall and reinstall the application in question or go back to the application creator (company) for help.  But I am the creator and I am building the release on this system and then trying to run it on this system and I get the MSVCR120.dll error.  Is there ANYTHING anyone can give me for advice?

    Wednesday, January 27, 2016 5:06 PM

Answers

  • I found the fix for this issue on my own (and incidentally, it is not "my code" per se).  The code for my program was using:

    //// Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);

    if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
    {
    return TRUE;
    }

    //// Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
    {
    return FALSE;
    }

    To handle command line arguments.  In prior versions of C++ Redists this worked.  But with 2013 Redsit the ProcessShellCommand function was failing when cmdInfo had nothing.  The answer was to wrap that if statement with a check for the existence of a shell command for File New:

    //// Dispatch commands specified on the command line
    if (cmdInfo.m_nShellCommand != CCommandLineInfo::FileNew)
    {
    if (!ProcessShellCommand(cmdInfo))
    {
    return FALSE;
    }
    }


    Thursday, January 28, 2016 4:42 PM

All replies

  • Hi,

    We have received the message regarding to your issue. We would consider that the system file "MSVCR120.DLL" corrupted.

    Based on my research, the msvcrt.dll is now a system component owned and built by Windows. It is intended for use only by system-level components.

    You could run SFC tool to fix the system file. Please tell us if any error displayed after you ran it.

    https://support.microsoft.com/en-us/kb/929833

    Since the application is developed by yourself and your issue is related to the code developing, you will get more help if you post your issue to MSDN forum.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Thank you for your understanding. 

    Best Regards,

    Simon


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, January 28, 2016 7:15 AM
    Moderator
  • 1) I have run SFC, a couple of times, and no change.

    2) I did not "change" anything in regards to this file, msvcr120.dll or msvcrt.dll when this started happening.   All I did was add a an InstallShield Limited project to my build to install the program.

    3) I have fixed, uninstalled and reinstalled, tried different versions of the VC++ redistributables (mostly sticking with 2013) and it is still a problem

    4) Finally, I tried for "fun" to run the release version via Visual Studio 2013 and I did NOT get the error.  I only get the error from the installed version.

    Thursday, January 28, 2016 3:16 PM
  • I found the fix for this issue on my own (and incidentally, it is not "my code" per se).  The code for my program was using:

    //// Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);

    if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
    {
    return TRUE;
    }

    //// Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
    {
    return FALSE;
    }

    To handle command line arguments.  In prior versions of C++ Redists this worked.  But with 2013 Redsit the ProcessShellCommand function was failing when cmdInfo had nothing.  The answer was to wrap that if statement with a check for the existence of a shell command for File New:

    //// Dispatch commands specified on the command line
    if (cmdInfo.m_nShellCommand != CCommandLineInfo::FileNew)
    {
    if (!ProcessShellCommand(cmdInfo))
    {
    return FALSE;
    }
    }


    Thursday, January 28, 2016 4:42 PM