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 8693247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:30:25+00:00 2026-06-13T00:30:25+00:00

I’m creating child processes with CreateProcess function in MSVC++ 2010, and before that setting

  • 0

I’m creating child processes with CreateProcess function in MSVC++ 2010, and before that setting error level with SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);

The task is to run console programs and hide any annoying messages like famous “Don’t send” dialog preventing program from being normally finished after critical error.

So, if i create child process containing some error(for example division by 0) it works fine, but when i create subprocess with vector index overflow it causes nonavoidable assert error message(in Debug mode of course). Here is the code of this program:

#include <stdlib.h>
#include <vector>

int main(int argc, char *argv[])
{
    int index = atoi(argv[1]);
    switch(index)
    {
    case 0:
    {
        int k = 3, j = 3;
        j -= k;
        k = k/j;//division by zero
    }
    case 1:
    {
        std::vector<int> k(2);
        int i = k.at(2);//index is out of bounds and it causes assert failure
    }
    }
}

In Release configuration it works fine, but in Debug – it causes an assert error dialog. Of course I can just add _set_abort_behavior to child program code, but it is not an option for me.

Is there any way to surpass this assert error dialog for programs compiled in Debug configuration?

  • 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-06-13T00:30:26+00:00Added an answer on June 13, 2026 at 12:30 am

    A general way would be to launch the process as a debugee, or create a simple debugger that always ignores unhandled exceptions. There may even be an existing debugger that does this already, I just don’t know of one.

    Couple nice things about this approach:

    1. It’s easy to contain all this behavior; it doesn’t impose much on the caller
    2. It gives you the opportunity to log unhandled exception information yourself, for example saving minidumps automatically and silently.
    3. I believe these assertion dialog windows only appear when the app is not being debugged. This means a debugger approach is also specifically a way for you to handle these. I believe if you just resume the debugee though, it may then pop up the dialog. I am not sure how you’d handle that; it’s just normal program continuation. Maybe you can munge registers at the debug break to bypass it.

    It would get more tricky when you need to do this for the entire sub process tree though, or if you want to make any app “silent” with no message boxes or user input.

    Note that these debug assertion dialog windows are typically only enabled on debug builds. For production they should not show up at all.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this

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.