Edit

Share via


C Runtime errors (Rxxxx)

The C Runtime library (CRT) may report a runtime error when your app is loaded or running. Even though each message refers to the Microsoft Visual C++ runtime library, it doesn't mean there's a bug in the library. These errors indicate either a bug in your app's code, or a condition that the runtime library can't handle, such as low memory. End users of your app may see these errors unless your write your app to prevent them, or to capture the errors and present a friendly error message to your users instead.

Important

The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may resolve multiple subsequent errors.

To get help on a particular diagnostic message in Visual Studio, select it in the Output window and press the F1 key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool at the top of the page to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the table of contents on this page.

Note

Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page and think the error or warning message needs additional explanation, let us know by using the feedback buttons on this page. If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the Developer Community site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Suggest a Feature. Some compiler error topics were created that are not emitted by the compiler and now redirect to this page instead.

You may find additional assistance for errors and warnings in Microsoft Q&A C++ forums. Or, search for the error or warning number on the Visual Studio C++ Developer Community site. You can also search Stack Overflow to find solutions.

For links to additional help and community resources, see Visual C++ Help and Community.

C Runtime errors

Error Message
C Runtime Error R6002 floating-point support not loaded
C Runtime Error R6008 not enough space for arguments
C Runtime Error R6009 not enough space for environment
C Runtime Error R6016 not enough space for thread data
C Runtime Error R6017 unexpected multithread lock error
C Runtime Error R6018 unexpected heap error
C Runtime Error R6019 unable to open console device
C Runtime Error R6024 not enough space for _onexit/atexit table
C Runtime Error R6025 pure virtual function call
C Runtime Error R6028 unable to initialize heap
C Runtime Error R6030 CRT not initialized
C Runtime Error R6031 Attempt to initialize the CRT more than once. This indicates a bug in your application.
C Runtime Error R6032 Not enough space for locale information
C Runtime Error R6033 Attempt to use MSIL code from this assembly during native code initialization. This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain.
C Runtime Error R6035 A module in this application is initializing the module's global security cookie while a function relying on that security cookie is active. Call __security_init_cookie earlier.

See also

C/C++ Compiler and build tools errors and warnings