XRを中心とした技術ブログ。 Check also "English" category.

How to solve Visual C++ Runtime Error message

Have you met "Visual Studio C++ Runtime Error" ? In my case, I met with the error when I run a tutorial application of Meta2 Head Mount Display.
In this post, I investigated the cause of the error and how to resolve it.


Microsoft Visual C++ Runtime Library Runtime Error!の対処方法 - CrossRoad

1. What is Visual C++ Runtime Error?

Visual C++ Runtime is the libraries for running software developed by Visual C++ library. For example, if you'd like to run a software developed by Visual C++ 2015 library, you need to have a package of Microsoft Visual C++ Redistributable 2015.
Many application need Visual C++ Runtime library. Following figure shows setting application in my PC. Several version of Visual C++ Runtime library.

List of applications in Windows 10

The version of the runtime library is showed not only "2015" but also "10.0.30319". Detailed information is showed like the following figure.

detailed information of application installed on Windows10

Basically, when an application is installed, appropriate runtime library is automatically installed. You don't have to concern about runtime library as long as some error happens. If error happens, you can install appropriate libraries manually. You should understand several things below.

(1) You can get runtime libraries at Microsoft Download Center

Here is the link.

Microsoft Download Center

(2) Some version of libraries are not provided at Microsoft Download Center

I don't the reason, but several version of the libraries are provided at other link.

(3) Some runtime libraries depends on language not version number

Some libraries is the different because language is different. It means that if you use a Japanese application, you need runtime library in Japanese. (Of course language is not always cause of the error)

2. What is Runtime Error?

Runtime Error means that appropriate runtime library is not found. In my case, no specific message was showed. Normally file path of the error is showed in red square.

Visual C++ Runtime Error message

3. How to solve runtime error problem

3-1. Install appropriate runtime libraries

You install appropriate runtime libraries with log investigation by yourself or you inquire developers / companies.

3-2. Change order of environment variable

Meta Company developer showed it. He said when the environment variable which is related with the application is ordered upward direction runtime error message sometimes disappear.

[Example : before]
PATH  :  C:¥WINDWOS¥System32; C:¥WINDOWS; <your application's environment variable>.....
[Example : after]
PATH  :  <your application's environment variable>; C:¥WINDWOS¥System32; C:¥WINDOWS; .....

The following figure explains how to open environment variable setting.

System property of Windows 10

In environment variable window, you click "Path".

Environment variable window on Windows10

You can change order of each file path. You move the path upward direction.

Edit window of environment variable

3-3. Clean install Windows 10

It's a last resort but I solved the problem with clean install. In my case, my PC had been upgraded from Windows 8.1 to Windows10. According to Meta Company developer, several runtime library rarely conflicts on upgraded PC from 8.1 to 10.

I got runtime library as far as I can and installed them. But the problem was not solved. On the other hand, no matter happened on clean installed PC. The PC hardware was of course the same. Therefore, I think an environment on upgrade from 8.1 to 10 caused the problem.

4. Conclusion

In this post, I introduced about Visual C++ Runtime Error and showed several solution. Windows OS upgrade from 8.1 to 10 cause the problem. I'll be happy if the information help for you.