Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:28:44+00:00 2026-05-23T12:28:44+00:00

I have a program that runs fine in DEBUG mode but in RELEASE mode

  • 0

I have a program that runs fine in DEBUG mode but in RELEASE mode I get an unhandled exception due to an access violation. I’m pretty sure it’s not due to null pointers. Here is the call stack:

msvcr90d.dll!memchr(unsigned char * buf=0x0000002c, unsigned char chr='', unsigned long cnt=1243588)  Line 80         Asm
msvcp90d.dll!std::char_traits<char>::find(const char * _First=0x72656d6f, unsigned int _Count=15, const char & _Ch=',')  Line 590 + 0x15 bytes     C++
msvcp90d.dll!std::basic_string<char,std::char_traits<char>,std::_DebugHeapAllocator<char> >::find(const char * _Ptr=0x0012f9e4, unsigned int _Off=0, unsigned int _Count=1)  Line 1796 + 0x2d bytes  C++
Program.exe!boost::program_options::option_description::set_name()  + 0x61 bytes   C++
Program.exe!boost::program_options::option_description::option_description()  + 0x90 bytes C++
Program.exe!boost::program_options::options_description_easy_init::operator()()  + 0x58 bytes           C++
Program.exe!CommandLineInput(int count=2, char * * vector=0x003d3360)  Line 191 + 0xac bytes          C++
Program.exe!main(int argc=4233952, char * * argv=0x00000002)  Line 65535        C++
Program.exe!__tmainCRTStartup()  Line 582 + 0x17 bytes            C

Code:

namespace po = boost::program_options;

int _tmain(int argc, _TCHAR* argv[])
{
        try
        {
            CommandInput (argc, argv); //get command line input
        }
        catch ( std::exception e )
        {
            std::cout << "WARNING: Exception is thrown" << std::endl;
            return 0;
        }
}

void CommandInput (int count, _TCHAR* vector[])
{
        po::options_description desc("Available Parameters");
        std::cout << "\n";
        desc.add_options()
            ("option1", po::value<std::string>(), "description1")
            ("option2", po::value<std::string>(), "description2")
            ("option3", po::value<std::string>(), "description3");

/*
The code breaks at the above line
*/
}

The exception reads:

Unhandled exception at 0x1026f09b (msvcr90d.dll) in Program.exe: 0xC0000005: Access violation reading location 0x72656d6f.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:28:45+00:00Added an answer on May 23, 2026 at 12:28 pm

    I think the problem I may be facing is that my program loads the symbols from the DEBUG CRT DLL’s. By the time the access violation occurs, the symbols from the RELEASE CRT DLL’s are not loaded. I have checked all the projects involved in my program and they all use a Multi-threaded DLL (/MD) and yet it’s still using the debug version of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Visual Studio 2005 C++ program that runs differently in Release mode
I have a simple java program that runs fine in eclipse but cannot find
I have developed a java program that runs fine in Mac OS X (10.6.7).
I have trouble deallocating memory that I allocated using malloc. The program runs fine
I have a program that runs fine on MacOS and Linux and cross-compiles to
I have an issue where a program that runs fine under windows xp has
I have a Haskell program that uses Gtk/GtkGLExt and runs fine on Linux (up-to-date
I have a C++ program that uses 2 threads. The program runs fine in
I have a WPF program that runs fine on the development PC and on
I have program that runs fast enough. I want to see the number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.