unhandled exception access violation C++ Visual Studio before main is called - c++

I'm getting the following error as soon as I click run to debug in Visual Studio 2013 . . .
I'm not sure how to proceed as I put a breakpoint on the first step in main and it does not hit this breakpoint.
History: I was handed a working program and was asked to integrate an updated dll. The dll had a couple I/O changes which I updated in the wrapper to enable the program to build. Now when I run I get the mentioned error.
Any next step advice as to what to check from here?

Related

How to trace an unhandled exception in C++ using Visual Studio 2017

I am currently working on fixing a project for a client. A little information about the project first:
Originally developed in Visual Studio 2012 using xp_v110 build tools
Multiple projects in the solution
Currently updating/debugging in Visual Studio 2017 using VS 2015/xp_v140 build tools
Working on Windows 10
The application will run in debug mode, however if I just leave the application after starting the debug session (i.e. not opening/clicking on the application to open it as it starts minimized in the tray), the application crashes after 1-2 minutes.
Unfortunately the IDE is showing that the crash is taking place in chkstk.asm with the following message:
Exception thrown at 0x0064EDF9 in <<exe name>>: 0xC00000FD: Stack overflow (parameters 0x00000000, 0x000A2000).
I have updated the exception settings to break when all C++ Exceptions are thrown, checked the box that says "Break when this exception type is thrown", and wrapped the initial method that runs in a try block, however I can never catch the error in the C++ code; it always occurs in the chkstk.asm file.
Any suggestions on how I can find out where in the C++ code the exception is occurring. Like I said, this is an update for a client and the original programmer is not available, and they never commented their code, so it is difficult enough trying to go through all this. Any help/suggestions would be greatly appreciated. Thanks in advance.

Visual Studio 2015 freezes when debugging a cpp code

I've installed Visual Studio 2015 Enterprise. I'm trying to create a c++ OpenGL project, however, it always freezes when I'm debugging(ctrl + f5). I've tried to write a simple program that prints text to the screen and it still freezes. The build completes successfully, projects in C# don't freeze as well. When I'm trying to run the cpp project VS freezes completely and I have to kill the process, running the .exe directly freezes the explorer..
I haven't found any solution to that kind of problem in the web, and I was hoping that someone here will know what to do..
Thanks :)
Try setting a breakpoint on the very first line of your main, click on debug and see if it gets to the breakpoint. If it does, try stepping through until you see what is causing your freeze.
I had exactly the same problem as you. Turns out my Avast anti-virus was causing the issue. I disabled it and now it's working.
I found the answer from this question:
Visual Studio 2015 freezes when finished building

Visual Studio stops breaking on assert()

This started happening today for a Visual Studio 2013 project but I have seen it now and then over the years in other Visual Studio versions.
Running a debug build and for some unknown reason aborts stop raising the message dialog that allows you to break and debug and instead you simple get a message in the output window and the program terminates.
R6010
- abort() has been called
The program '[9408] test_explode.exe' has exited with code 3 (0x3).
Over many years as a C++ developer this gremlin pops up now and then and I always forget how I solve it and can't see what the cause was. I'm sure someone can shed more light on what's happening and the correct fix and at a minimum I'll at least add my own notes.
A manual call to _set_error_mode(_OUT_TO_MSGBOX) somewhere in my program restores the correct behaviour. So it appears the default error mode is being set wrong by some compiler option or Visual Studio setting? I'm just not sure what.
All Debug->Exception settings are enabled.

Visual Studio 2013 debugging access issue with breakpoints

I've been having an issue with debugging my C++ programs recently in Visual Studio 2013. Normally my programs will run fine, however, when I include a breakpoint at the end of my code in order to keep the console open, I will have to manually stop the debugging of the program afterwards (Shift + F5), which will consistently cause an error saying "The debugger was unable to terminate one or more processes: [4912] .exe: Access is denied. The debugger may be unstable now. It is recommended that you save all files and exit." If I go on to continue coding and then compile again later, it will fail to compile with the error that access is denied with fatal error LNK1168, saying it cannot open the .exe for writing. This only happens when I include a breakpoint in my code, so I'm wondering if there's a fix for this, or something that I'm doing wrong? Thanks.

VS2010 Access Violation while step the code using F10 or F11

I have a C++ native code that run fine in Debug and Release mode. But there is a little problem, if I debug my program and set a breakpoint in my code visual studio stop on breakpoint then if I press F5 to continue run code run normally but if I press F10 or F11 visual studio catch an AccessViolation and program will be stopped due to the fact that exception is not anywhere in my code and I don't handle it.
This error will not occure in Console application but in MFC application or when I use a .NET EXE to debug my native DLL.
I have a 64 bit Win7 and VS2010 SP1.
Sorry!! I found a solution, you must turn off Tools/Options/Debugging/Native/Enable RPC debugging.
and every thing will go fine. But I don't know if I want to debug RPC calls to external server, what should I do, so if any one help me and find the reason of failure it will be great