I had a VC++ project (console application) built on VS2013. It was working successfully for a long time. Recently we have converted that project to VS2019 (PlatformToolset 142). Now the latest exe is crashing after some operation with below error.
Faulting application name: abc.exe, version: 0.0.0.0, time stamp:
0x5eb3101a Faulting module name: ntdll.dll, version: 6.3.9600.19678,
time stamp: 0x5e82c88a Exception code: 0xc0000005 Fault offset:
0x0000000000030837 Faulting process id: 0x137c Faulting application
start time: 0x01d624424de8d7e1 Faulting application path: Faulting
module path: C:\Windows\SYSTEM32\ntdll.dll Report Id:
8bad3b06-9035-11ea-80de-d6b5b2fa72df Faulting package full name:
Faulting package-relative application ID:
One big observation is VS2019 exe is half size of VS2013 exe. How to debug further to find out the root cause of the application crash?
After run-in remote debug found that it is throwing an unhandled exception at
HeapAlloc( m_hHeap, HEAP_NO_SERIALIZE, _Count * sizeof( value_type ));
This was working perfectly with VC2013. This HeapAlloc issue I am getting whenever we are calling std::vector related operation. Is anything got change related to this in VS2019/VC++2019 ?
I use Qt 5.10.1 64 bit, msvc2017-64, all dlls from the redistributable package are included. It happened just once, I can not reproduce it.
Problem Event Name: APPCRASH
Application Name: eyeblink.exe
Application Version: 3.1.2.0
Application Timestamp: 5acb80c8 Fault
Module Name: ucrtbase.DLL
Fault Module Version: 10.0.14393.2247
Fault Module Timestamp: 5adc1d0b
Exception Code: 40000015
Exception Offset: 000000000006eacf
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1051
Additional Information 1: 53f4
Additional Information 2: 53f453b2107907ea889c32b664ccee74
Additional Information 3: c023
Additional Information 4: c023e69e5a570b66998367aafd38badf
I am using PyFMI as a FMU master for testing my tool which is acts as a FMU 2.0 slave.
When i call load_fmu('fmuFile.fmu', log_level=5) function for loading the fmu, python.exe is crashing .
When i check event viewer it is showing the exception code 0xc0000005.
How to fix this error or how to get more information about this error?
Note: pyFMI works fine, when my tool acts as FMU 1.0 slave. I use the same python for both FMU 1.0 and FMU 2.0
Following is the extract from the event viewer:
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x56634a05
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000000
Faulting process id: 0x3328
Faulting application start time: 0x01d3375493d4b63f
Faulting application path: C:\JModelica.org-SDK-1.12\Python27\python.exe
Faulting module path: unknown
Report Id: e9932029-a347-11e7-bb26-40b0341357d4
A brief story about my problem:
My application [which is compiled in VC++ 2010] is supposed to have fewer viewing/working rights to Standard user, while of-course in Administrative user it will have full permission.
Few days back when I tried to run the application [installed version that is release binaries] in Standard user I saw a crash in MFC140ud.dll [weird]. It should not be ud version. Anyways, in my programs & features [I am a Win7 user] I saw Runtime & redistributable of VS2015.I uninstalled them.
I restarted my computer with not much luck- and I was still getting crash but in different dlls.
It shows two dialog boxes showing errors. One is showing error in MSVCR100d.dll and second is showing in ntdll.dll
Here is the problem signature from the two boxes:
Problem signature:
Problem Event Name: APPCRASH
Application Name: MyAppName.exe
Application Version: 4.5.64.0
Application Timestamp: 594a41e2
Fault Module Name: MSVCR100D.dll
Fault Module Version: 10.0.40219.325
Fault Module Timestamp: 4df2be37
Exception Code: 80000003
Exception Offset: 0011b545
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
--
Problem signature:
Problem Event Name: APPCRASH
Application Name: MyAppName.exe
Application Version: 4.5.64.0
Application Timestamp: 594a41e2
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.23796
Fault Module Timestamp: 59028e17
Exception Code: c015000f
Exception Offset: 00083af6
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 55c7
Additional Information 2: 55c739abdb4e531959bbe02ef6e9e097
Additional Information 3: e422
Additional Information 4: e422b1470321edbfed7e5b3f5a1b3d28
--
I reinstalled VS2010 redistributable but no luck.
I see same error even if I try it running as admin [right click and select Run as admin].
If I run it from Administrator account it works fine.
Also, I want to add- if it helps anybody to help me correct- usually I keep windows updates, but, few days back it installed a long list of updates.
So I think it is Win7 updates causing problem but not sure.
Any help is appreciated.
I have a C++ windows application that was done by another programmer, that I had to remove one line of code. After rebuilding the application with visual studio 2013 it crashes with this in the event log:
Faulting application name: WaveStream.exe, version: 0.0.0.0, time stamp: 0x536122da
Faulting module name: WaveStream.exe, version: 0.0.0.0, time stamp: 0x536122da
Exception code: 0xc0000409
Fault offset: 0x0000bd7f
Faulting process id: 0x8b8
Faulting application start time: 0x01cf6490aee4f557
Faulting application path: C:\Program Files (x86)\PS Audio\WaveStream.exe
Faulting module path: C:\Program Files (x86)\PS Audio\WaveStream.exe
Report Id: efe00d42-d083-11e3-a513-bc305baf9e1e
The application uses QT 4.7.4, and compiles with no errors. I am an embedded systems programmer and have very little windows programing experience. What can I do to figure out why it is crashing?
Dennis
The clue to the problem is in the exception code: 0xc0000409
0xc0000409 means STATUS_STACK_BUFFER_OVERRUN.
In other words, something in your program is writing past the current stack frame, corrupting data on the stack. The program has detected this and rather than let it continue, has thrown an exception.
How do you debug this? There are a few options:
1) Rerun this in the debugger and watch it crash, workout what failed.
2) If you've got a crash dump of this, load that in the debugger, hit F5 and workout what failed.
3) If you don't have a crash dump you can still attempt to find out the cause of the crash if you know the absolute address of the crash (and know the module always loads at a fixed address), or if you know the offset of the crash location from the start of the faulting module.
The crash information above tells you the offset into the faulting module of the crash. That's reported in the Fault Offset field. In your example, that is an offset of 0x0000bd7f.
If you've got the original dll/exe and it's matching PDB, just load it into DbgHelpBrowser, go to the Query menu, choose "Find Symbol with DLL Relative Address..." then enter the offset in the field and click "Find Symbol...". The display will move to show you the nearest matching symbol, highlighting the symbol and display any info about parameters, line numbers and source code.
It's a free tool. You can get it here:
https://www.softwareverify.com/cpp-dbghelp-browser.php
Disclaimer. I wrote this tool to do just this job for our in house use. We recently made it available for everyone else. I found this question while trying to understand what the exception code 0xc0000409 meant.
Try to create a crash dump for the application. See this StackOverflow question and the MSDN documentation on how to do that. Once you have the crash dump file, open it in the Visual Studio debugger and you will be able to see the exception and call stack for the exception, which should help.
!analyize -v in windbg
It will do a lot of work for you.