I'm using QT Creator and the exception warnings really sucks, because they're logging everywhere.
Example in compiler output:
Exception at 0x7ffad5e54008, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at
At Issues:
How can I disable this behavior?
For Windows: Go to Tools -> Options -> CDB -> Add Exceptions to Issues View -> uncheck "First chance exceptions".
Contrary to what I expected it does two things: remove the exceptions from the issues view, and stop them from appearing in the application output tab.
Related
Why am I getting this in the output window:
Exception thrown: 'System.Data.Entity.Core.EntityCommandExecutionException' in EntityFramework.SqlServer.dll
Is there any way to see where the exception is thrown from and why this is ?
Debug > Windows > Exception Settings, tick the box for CLR exceptions was what I was looking for.
I'm currently using Qt Creator 4.4.1 with Qt 5.9.2 and the MSVC 2015 32/64 Bit compilers to create a DLL on Windows 7.
In Qt Creator under
Projects -> Build & Run -> Desktop Qt 5.9.2 MSVC2015 xxbit -> Run -> Executable
I've specified the host application, that loads my DLL, so when I hit F5 this app gets executed and loads my DLL without a flaw.
However, on loading, the main app raises an exception which I have no hands-on, making Qt Creator showing up a message box with the following content:
The inferior stopped because it triggered an exception.
Stopped in thread 0 by: Exception at 0x60251637, code 0xc0000005: write access violation at: 0x1, flags=0x0 (first chance).
I now have to close the message box and hit F5 again to proceed.
Because I have to do this for every test run, again and again, it becomes really annoying. So, is there a simplest way to tell CDB from Qt Creator to ignore only that specific type of exception?
Look at the call stack, find the relevant code and see what it does. You should find a try ... catch ... around that line. See whether you can avoid the exception in some way, typically by introducing an if ... else ....
If you cannot avoid it, and you made sure it's really safe to ignore it, start CDB with command line argument -c "sxn c0000005" or the equivalent -c "sxn av", where AV is short for "access violation". You can use sx to see all exception settings.
I encountered the same problem, the problem may be caused by the variable is not initialized, for example:
QLable *lable;
If you forget to allocate memory for this variable, it will cause this error.
lable = new QLable(this);
I think you should check your variables.
A comment more than a question:
The following describes an issue I had this evening and what I did to "correct" it. These events required a few hours of time to resolve. As this site is one of my favorite sources of information, thought this post might benefit someone else. Any constructive comments on diagnosing QT Creator run-time exceptions would be welcome. The exception seems to have been the result of corruption in the symbol file for QCored.
Exception (QtCreator debugger KernelBase Exception)
Exception at 0x759fc41f, code: 0x406d1388: Startup complete, flags-0x0 (first chance) in KernelBase!RaiseException
Windows: QtCreator 3.0:
Configuration Build: build-QMRC-Qt_5_2_0_msvc2010_opengl-Debug
Application Output Window displayed exception with a valid build.
Corrective Action:
Deleted Windows subdirectories:
c:\users\\appdata\local\temp\
Run qmake
rebuild debug mode
I stumbled upon an interesting problem. I have managed to reduce the problem to the following code:
boost::property_tree::ptree properties;
boost::property_tree::read_xml("Additional Dependencies\\properties.xml", properties);
xml:
<Properties>
<PictureGenerator>
<miniatureHeight>4</miniatureHeight>
<miniatureWidth>4</miniatureWidth>
<imageHeight>8</imageHeight>
<imageWidth>8</imageWidth>
<ImagePath>Additional Dependencies\</ImagePath>
<Miniatures>
<Image>0.bmp</Image>
<Image>1.bmp</Image>
<!--<Image>2.bmp</Image>
<Image>3.bmp</Image>
<Image>4.bmp</Image>-->
</Miniatures>
</PictureGenerator>
</Properties>
When i build the project in Release mode, everything runs perfectly.
In Debug mode I get the following error:
Unhandled exception at 0x779e8e19 in my_project.exe: 0xC0000005: Access violation writing location 0x00000014.
I am using VS2010.
Upon further inspection the error is thrown in the read_xml_internal function while trying to create a vector from a basic_istream.
At first I thought that I gave the wrong path, but I works perfectly in Release mode.
I have found the source of the problem.
I have reproduced the same error with istream, and it turned out that I had a wrong property page set for Debug.
The problem was the property:
C/C++ -> Code Generation -> Runtime Libary as Multi-threaded
I have changed it to Multi-threaded Debug Dll and it works perfectly.
Following on the tails of my previous (answered) question...
SharpSvn makes calling the Subversion client API simple:
SvnClient client = new SvnClient();
client.Authentication.DefaultCredentials = new NetworkCredential(username, password);
client.CheckOut(new Uri("http://xxx.yyy.zzz.aaa/svn/repository"), workingCopyDir);
On the other hand, calling the client API from C/C++, as shown in minimal_client.c requires coding "closer to the metal", as it were, on Subversion.
Are there Windows libraries for C++ in Visual Studio 2003 that present a simpler interface than what minimal_client uses?
If there are not, is there a VS2003 C++ project (a .vcproj file) that demonstrates getting minimal_client to run? I'm able to compile minimal_client.c and link it using the following libraries:
libsvn_client-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_fs_base-1.lib libsvn_fs_fs-1.lib libsvn_ra-1.lib libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_subr-1.lib libsvn_wc-1.lib libapr-1.lib libaprutil-1.lib xml.lib libneon.lib
but when I run my application (in the debugger or start the release build without debugging), it runs for about 20 seconds without hitting the first line of main() and then throws this exception:
An unhandled exception of type
'System.TypeLoadException' occurred in
Unknown Module.
Additional information: Could not load
type apr_pool_t from assembly
minimal_client,
Version=1.0.3477.16033,
Culture=neutral, PublicKeyToken=null.
I've tried various combination of libsvn_.lib and svn_.lib to no avail.
Any thoughts on what I'm doing wrong?
EDIT: I started fresh with a "Win32 Console Project" (still in VS2003) and I am now able to debug the first few lines of my app. But now, on this line:
if (svn_cmdline_init ("minimal_client", stderr) != EXIT_SUCCESS)
I get a different exception (in the debugger or start the release build without debugging):
Unhandled exception at 0x7c91b21a in
Win32ConsoleProject_minimal_client.exe:
0xC0000005: Access violation writing
location 0x00000010.
EDIT: This thread explains that this error is a CRT mismatch between svn and stderr in my app. If I don't want to build Svn so they match (I don't want to), I can pass NULL instead of stderr (provided I'm willing to do without messages that would go to stderr) When I did this, my app ran all the way through correctly.
It seems that C++ wrappers are not overflowing the 'net. However, you may want to try SVNCPP, which can be yoinked from RapidSVN.
See http://rapidsvn.tigris.org/ for details (note: I've not tried it).
Can you upgrade to Visual C++ 2005 ? If so, you could just go using SharpSvn with C++/CLI.
Or even maybe stick to VC2003 and go SharpSvn with Managed C++ ? (not that I have any knowledge on the how od even the if)
edit: oh well, SharpSvn's homepage explicitely states that VC++ 2005 SP1 is required...