Faulting application name: Application.exe, version: 28.11.2022.0, time stamp: 0x6507c0c9
Faulting module name: ModuleName.dll, version: 5.5.2021.0, time stamp: 0x60923739
Exception code: 0xc0000409
Fault offset: 0x000659cc
Faulting process id: 0x20b8
Faulting application start time: 0x01da398e25463d19
Faulting application path: C:\Application\program\Application.exe
Faulting module path: c:\Application\program\ModuleName.dll
Report Id: 94094d0c-3eff-4d83-9b04-a32f166caeff
Faulting package full name:
Faulting package-relative application ID:
====================
The application randomly crashed and I got the above information from the Event Viewer. I have the source codes in C++ of the application and the DLL as well as their PDB files.
- How to debug/find the specific line of code of that fault offset using Visual Studio?
- What does the meaning of the fault offset? Is that the offset from the base address of Application.exe or ModuleName.dll?
I have tried the method in https://www.youtube.com/watch?v=HkAhFhcLn9Q. It works if the application name and module name are the same. But I cant make it work in this case where the faulting module name is different from the faulting application name. Thanks!
Thanks!
====== Update 04/01/2024 =======
I used MSVS to check the disassembly of the program. The fault offset points to the line 22 below. I think the program is using NtSetInformationThread and RtlNtStatusToDosError in ntdll.dll to set the priority of the thread. The program can still work alright, but it crashes once every a few days when running 24/7.
- ?? ??
- loopne _RtlpHpFreeHeap@20+0CCh (77289D9Fh)
- dec dword ptr [ebx+2EBFC55h]
- mov eax,esi
- mov ecx,edi
- test eax,eax
- jne _RtlpHpFreeHeap@20+0E5h (77289DB8h)
- lea ecx,[edi+8]
- lea eax,[edx+8]
- push eax
- push 3
- push ecx
- movzx ecx,byte ptr [edx+2]
- mov edx,ebx
- and ecx,0Fh
- call _RtlpCallInterceptRoutine@20 (77278BE3h)
- test eax,eax
- js _RtlpHpFreeHeap@20+18Ch (77289E5Fh)
- test dword ptr [ebx+0Ch],10000000h
- je _RtlpHpFreeHeap@20+12Ch (77289DFFh)
- push dword ptr [ebp+8]
- mov edx,edi
- mov ecx,ebx
- call _RtlpHpSizeHeap@12 (7728A63Ch)
- cmp eax,0FFFFFFFFh
- jne _RtlpHpFreeHeap@20+12Ch (77289DFFh)
- push esi