CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    99

    Angry program runs under xp but crash under vista

    hello guys,

    my program runs ok under the debug mode, but a little bit slow. so i compiled it with the release mode. and the program crashes.

    the problematic function is the __tmainCRTStartup() function. and the error says "Unhandled exception at 0x7661fbae in xxx.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0033edd8.."

    i don't know how to fix this, because the program crashes before it gets into my "main()" function.

    i also tried to compile this program under windows xp. it runs perfectly under both debug and release mode.

    i'm using vs2008.

    any ideas?

    thanks.

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: program runs under xp but crash under vista

    Quote Originally Posted by billconan View Post
    the problematic function is the __tmainCRTStartup() function. and the error says "Unhandled exception at 0x7661fbae in xxx.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0033edd8.."

    i don't know how to fix this, because the program crashes before it gets into my "main()" function.
    The main() function is not the first function that is invoked in a C++ program.

    Does your program contain global variables? If you have global variables that are objects, the constructor for those objects get initialized before main() is reached. So if this is the case, the constructor for one of your globals is faulty.

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured