debugging 无法在VS 2019中调试C++应用程序

ruyhziif  于 2022-11-14  发布在  其他
关注(0)|答案(1)|浏览(306)

I have a C++ project that I am able to build and run as an exe just fine.
However, when I try to debug the project in Visual Studio 2019 I get the following error:

"Unhandled exception at 0x75D7C66B (shell32.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0x00000004"

It also says: "Source Not Available: Source information is missing from the debug information for this module"
I don't understand this error. I have set breakpoints right at the beginning of the main() function but it never gets to these breakpoints so I don't know what causes the exception.
I have googled this for quite sometime but haven't found any similar problems.
I hope someone can help. Let me know if you need further details.
Edit: here is the call stack:
shell32.dll!CShellFolderViewOC::GetConnMap(int *) Unknown shell32.dll!`dynamic initializer for 'ATL::IConnectionPointContainerImpl::pConnMap''() Unknown ucrtbase.dll!__initterm() Unknown shell32.dll!dllmain_crt_process_attach() Unknown shell32.dll!dllmain_crt_dispatch() Unknown shell32.dll!dllmain_dispatch() Unknown shell32.dll!__DllMainCRTStartup@12() Unknown ntdll.dll!_LdrxCallInitRoutine@16() Unknown ntdll.dll!LdrpCallInitRoutine() Unknown ntdll.dll!LdrpInitializeNode() Unknown ntdll.dll!LdrpInitializeGraphRecurse() Unknown ntdll.dll!LdrpInitializeGraphRecurse() Unknown ntdll.dll!LdrpPrepareModuleForExecution() Unknown ntdll.dll!LdrpLoadDllInternal() Unknown ntdll.dll!LdrLoadDll() Unknown 01240307() Unknown [Frames below may be incorrect and/or missing] Unknown ntdll.dll!_KiUserApcDispatcher@16() Unknown ntdll.dll!LdrInitializeThunk() Unknown

jchrr9hc

jchrr9hc1#

我修好了。
在Visual Studio中,位于:
选项-〉调试-〉常规
禁用该选项:“在外部进程中加载调试符号(仅限本机)”
我还是不太明白为什么这个解决了这个问题。如果有人能解释一下,我会很感激的。

相关问题