Unhandled exception in debugging - visual-studio

During debugging my project, i am getting the an unhandled exception. I am new in debugging using visual studio 2017 , Can anyone give me any approach or idea to remove this exception? Due to this my application crashes. I am attaching the exact exception statement below.
Unhandled exception at 0x76442552 in someprocess.exe: Microsoft C++ exception: std::runtime_error at memory location 0x1C00F258.

Unhandled exception in debugging
Usually, the issue is caused by your code.And from the description, the error is from info.hasException.
Please make sure that when you define info property, you should set a default value to it like NULL;
You should check very carefully and make sure that info has value and its type is right.
Also, please provide a small sample about your project to help us troubleshoot the issue more quickly.

Related

The Demo example of RocketMQ in .NET SDK throwing System.TypeInitializationException exception

I am running the Demo Example given for .NET SDK RocketMQ. https://help.aliyun.com/document_detail/29561.html?spm=5176.doc29561.3.3.nIAzgT
But it is throwing the below exception.
An unhandled exception of type 'System.TypeInitializationException'
Additional information: The type initializer for 'ons.ONSClient4CPPPINVOKE' threw an exception.
I am not getting any solution for the issue.Can anyone please give a solution for the exception.
Make sure ONSClient4CPP.dll and ONSClient4CPP.lib in bin folder and vc++ 2015 is installed.

Unhandled exception at 0x7584c54f (KernelBase.dll)

I am facing this issue when i tried to Debug the project.
Unhandled exception at 0x7584c54f (KernelBase.dll) in xyz.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0126f258..
I have tried all the possibilities found on other threads but still unable to run the project.
The call stack is as follows:
KernelBase.dll!_RaiseException#16() + 0x58 bytes
libEGL.dll!68658ccf()
[Frames below may be incorrect and/or missing, no symbols loaded for libEGL.dll]
libEGL.dll!6864b083()
libEGL.dll!68657dae()
Thanks in advance
Try switching to "Multi-threaded Debug DLL (/MDd)". It worked for me.
Property Pages => Configuration Properties => C/C++ => Code Generation => Runtime Library

Visual studio 2010 first chance exception KernelBase.dll : 0x000006BA: Win32 exception

I am getting this on a build right after the line that says this:
Loaded 'c:\Windows\SysWOW64\msimg32.dll', Symbols loaded (source information striped).
That is the last thing I see when the program DOES NOT open in debug.
When it DOES open in debug I get the following after that line:
First-chance exception at 0x75f0c42d (KernelBase.dll) in xxx.exe: 0x000006BA: The RPC server is unavailable.
Most of the time I get the first case so I have to keep stopping the debug and starting it until the program comes up with the 2 case.
I have tried setting a break point for that exception from info I found on here already but even if i comment it out, i still get the first case with no program opening for debug.
I have tried using Microsoft Symbol Servers and without.
I am not sure what else to try as I am only getting the program running about 1 tries in 6.

No stack trace on exception

I have .NET application that sometimes happily catches System.OutOfMemory (of unknown origin). I tried to debug it by attaching visual studio to it, but when exception happened, visual studio was unable to show me any stack trace. How can I get the stack trace?
You should try to wrap any code that could result in an exception with a try-catch and then put a breakpoint on the catch statement of every try catch. So when you attach VS to it you will be able to analyse the Exception when the breakpoint has been triggered.
If you have a Main method wrap all the code in a try-catch and that might allow you to catch any exceptions that might be raised.

Visual Studio strange startup exception

For some reason VS was not breaking on exception when running in debug mode, so I followed the advice given here to go to Debug -> Exceptions and enable the CLR exceptions. I now get this error:
System.Globalization.CultureNotFoundException occurred
Message=Culture is not supported.
Parameter name: name
uploads is an invalid culture identifier.
Source=mscorlib
ParamName=name
InvalidCultureName=uploads
StackTrace:
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
InnerException:
This error occurs on startup, but only some of the time.
The advice here then recommends that I do the exact opposite and uncheck the debug the CLR option, but I am then back to square one! A poster suggests that it is a bug, but the post is two years old, so surely that has been fixed by now.
I am not using globalisation.

Resources