I'm running an OpenGL tutorial program using Visual Studio 10 and have seen it work on other machines but closes straight after running on mine. A small blank image display window pops up for a split second before it goes back to the code as if everything went smoothly.
Here is the output I'm getting:
'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\Tutorials.exe', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\glew32.dll', Binary was not built with debug information.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\freeglut.dll', Binary was not built with debug information.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\HsSrv.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\wtsapi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
'Tutorials.exe': Unloaded 'C:\Windows\SysWOW64\atigktxx.dll'
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0xaf0) has exited with code 1 (0x1).
The program '[6208] Tutorials.exe: Native' has exited with code 1 (0x1).
I'm not great with this kind of stuff so hopefully someone here can make sense of this.
You need to have a look at the parameters being passed around in your functions as your log is reporting with:
Invalid parameter passed to C runtime function.
First you should build it in Debug mode though, so that the PDB files will be generated and you can actually debug it.
Project Properties - Configuration Properties - Linker - Debugging - Generate Debug Info : Yes
Then just debug. As the comment mentions, the output is useless here, apart from the aforementioned line.
I had a similar problem, and I was probably running the same tutorial.
Use the debugger and find where the program crashes. If it's the function
static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
Then your GPU might not be able to interpret this version of OpenGL.
Try updating the drivers, or find glutInitContextVersion(4,0) and give it the arguments for example glutInitContextVersion(3,3) for older version of OpenGL.
Related
I have a .NET Core 3.1 API project that seems to have stopped launching under debug from Visual Studio after I hastily clicked through a Security Waring dial (shown in part below, excerpted from Hanselman's blog post).
I don't know if this action is what precipitated the failure to load.
What happens is the project exe appears to exit before invoking Program.Main() (verified that a breakpoint here does not hit). The full text of the Output Window is shown below after the break (I've attempted to pare down the wall-of-text, but need to show most of it for correct context).
I have tried various things to workaround the problem and/or to diagnose the issue:
Cleaning and rebuilding
dotnet dev-certs https --clean
dotnet dev-certs https --trust
viewing the certificate store (Windows) to see if anything is amiss (nothing is)
Clearing NuGet cache
Toggling Just My Code off/on
copying the project to a new one and changing namespaces (to see if some sort of caching or prior association caused an issue)
loading an old branch of code in which I've been able to do the debugging before
modifying launchSettings.json in various ways
setting all exceptions to break on (no exceptions occurred)
Adding new .NET API projects work as expected. It's the dialog that prompted me to think it was a cert issue, but again, I'm not sure.
Output Window Text
'Redacted.exe' (Win32): Loaded 'C:\dev\Redacted.exe'.
...
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\host\fxr\5.0.1\hostfxr.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\hostpolicy.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\coreclr.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
The thread 0x7188 has exited with code 0 (0x0).
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\System.Private.CoreLib.dll'.
'Redacted.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\System.Private.CoreLib.dll'.
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\clrjit.dll'.
'Redacted.exe' (Win32): Loaded 'C:\dev\sdk2\Framework.ApiSupport.Tests.Controller\bin\Debug\netcoreapp3.1\Redacted.dll'.
'Redacted.exe' (CoreCLR: clrhost): Loaded 'C:\dev\Redacted.dll'. Symbols loaded.
'Redacted.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\System.Runtime.dll'.
'Redacted.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.10\System.Runtime.dll'.
The thread 0x831c has exited with code 0 (0x0).
...
The thread 0x2008 has exited with code 0 (0x0).
The program '[37184] Redacted.exe' has exited with code 0 (0x0).
This was a complicated one. It turns out that a static class initializer in a third-party package was throwing an exception prior to Main() being called. This was also prior to any useful logging was available.
I only found this out by backing out as many dependencies as possible and building up until the exception occurred.
Hopefully this general answer provides a diagnostics path should anyone encounter a similar scenario.
I'm using GetOpenFilename to get some filenames
const int BUFFER_SIZE = 8192;
char* filenames = new char[BUFFER_SIZE];
filenames[0] = 0;
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = ::GetActiveWindow();
ofn.lpstrFile = filenames;
ofn.nMaxFile = BUFFER_SIZE;
ofn.lpstrFilter =
"Quotes\0*.json\0"
"All\0*.*\0";
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 0;
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrTitle = "Web File Import";
ofn.lpstrInitialDir = "T:\\WebPending";
ofn.Flags = OFN_ENABLESIZING | OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_ENABLEHOOK;
ofn.lpstrDefExt = "json";
ofn.lpfnHook = DDWebImport::Hook;
bool rv = ::GetOpenFileName(&ofn);
// Check the error if you have copied this code to another dialog and it returns immediately without popping up a form
DWORD err = CommDlgExtendedError();
I'm using a core i7 with an SSD and this is taking over 8 seconds to just show the files. When I had a look in the debug output window,
'xxx.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\Ink\tiptsf.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\edputil.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\policymanager.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp110_win.dll', Symbols loaded (source information stripped).
shell\comdlg32\fileopensave.cpp(9456)\COMDLG32.dll!76290750: (caller: 76283458) ReturnHr[PreRelease](1) tid(1664) 80070490 Element not found.
CallContext:[\PickerModalLoop\InitDialog\FileDialogInitEnterpriseData]
'xxx.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\thumbcache.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\ntshrui.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\srvcli.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\cscapi.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\StructuredQuery.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\actxprxy.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\Windows.Storage.Search.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\DataExchange.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\dcomp.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\d3d11.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\dxgi.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\twinapi.appcore.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Program Files (x86)\Common Files\TortoiseOverlays\TortoiseOverlays.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGitStub32.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGit32.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp120.dll', Symbols loaded.
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\gitdll32.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\libgit232_tgit.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcr120.dll', Symbols loaded.
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\zlib132_tgit.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\FileSyncShell.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\wininet.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\Telemetry.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\LoggingPlatform.dll', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\cabinet.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\mssprxy.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\root\Office16\GROOVEEX.DLL', Cannot find or open the PDB file.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp140.dll', Symbols loaded.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\ucrtbase.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Windows\SysWOW64\vcruntime140.dll', Symbols loaded.
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msi.dll', Symbols loaded (source information stripped).
'xxx.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\root\Office16\1033\GrooveIntlResource.dll', Binary was not built with debug information
How do I stop GetOpenFilename from loading DLLs like directx, git, tortoise git, groove, onedrive. With so many of them, they take ages loading and aren't necessary for just viewing a bunch of filenames.
The real answer I was looking for is in Slow loading of symbols during call to CoCreateInstance in VS 2012
Basically exclude the dlls from loading in Tools/Options/Debugging/Symbols
Look for all the dlls that say Cannot find or open the pdb file and add them to the list
In my MFC project I call CoCreateInstance at some point:
if ( SUCCEEDED( CoCreateInstance ( CLSID_DragDropHelper, NULL,
CLSCTX_INPROC_SERVER,
IID_IDropTargetHelper,
(void**) &m_piDropHelper ) ))
{
...
}
and a bit later once I'm done with the DragDropHelper I call Release:
m_piDropHelper->Release();
So far so good, everything works fine.
But during debug the very first call to this CoCreateInstance is painfully slow because VS is loading tons of symbols (this loading is visible in the VS Output window, see below). Subsequent calls to the same CoCreateInstance are fast. But when I restart de debugee, the first call to this CoCreateInstance is slow again.
I don't need these symbols for my purpose.
Is there a way to prevent Visual Studio from loading all these symbols.
Partial content of Output Window during debug
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Program Files (x86)\Common Files\TortoiseOverlays\TortoiseOverlays.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGitStub32.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGit32.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\libgit232_tgit.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files\TortoiseGit\bin\zlib132_tgit.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\msvcr120.dll', Symbols loaded.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Symbols loaded (source information stripped).
<30 more similar lines>
'MyProg.exe': Unloaded 'C:\Program Files (x86)\Microsoft Office\Office14\GROOVEEX.DLL'
'MyProg.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\GROOVEEX.DLL', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.6161_none_51cd0a7abbe4e19b\ATL90.dll', Symbols loaded (source information stripped).
'MyProg.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Cultures\OFFICE.ODF', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\1036\GrooveIntlResource.dll', Cannot find or open the PDB file.
'MyProg.exe': Loaded 'C:\Windows\SysWOW64\RpcRtRemote.dll', Symbols loaded (source information stripped).
You can include/exclude symbols by using Tools/Options/Debugging/Symbols.
The two options for "Automatically load symbols for:" should provide what you want.
This is my first post. So please excuse me if I dont make it a perfect one.
I am using OpenCV for around 2 months and now I wanted to start with GPU processing. So I unzipped a fresh copy of OpenCV 2.4.3 to a different location and used CMake with CUDA Support to buid it. I used CUDA 4.2 Toolkit and SDK and then when I built it. Then I set the environment variables and include, directory and binary properties in a perfect manner as described in many other posts here.
However, when I add a gpu code to my project, for example stereo_match.cpp, I am able to compile and build them successfully, but when I run them, there is no result. I just get a black screen that says :
"Usage: stereo_match_gpu --left --right # must be rectified --method # BM | BP | CSBP --ndisp # number of disparity levels"
and the program exits. I tried reading the code but couldn't find where I should be giving input images. I am a total noob in CUDA. So can someone please tell me if I am doing something wrong here. Is the method that I am following to build and run the GPU code right? Can you please suggest where I am going wrong? I am using Visual Studio Ultimate 32 bit with OpenCV 2.4.3. GPU is NVIDIA GeForce 525M.
Additional Info : When I run the built code, I get the following in the console :
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\gpu\x86\vc10\bin\opencv_core243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\cudart32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuda.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\user32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\lpk.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\usp10.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\sechost.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\devobj.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\npp32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcp100.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr100.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\gpu\x86\vc10\bin\opencv_gpu243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_imgproc243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_flann243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_features2d243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_calib3d243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_objdetect243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_highgui243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\avifil32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\winmm.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msacm32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvfw32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\avicap32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\version.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_video243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuvid.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuvenc.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\cufft32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msctf.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvinit.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\detoured.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\Nvd3d9wrap.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\nvdxgiwrap.dll', Cannot find or open the PDB file
The program '[1568] CV_Base.exe: Native' has exited with code 1 (0x1).
I think the error message is just saying that you have to pass in some parameters to the program which tell it where to find images. First, you will need 2 rectified images, say left.jpg and right.jpg. Then you have to instruct Visual Studio to pass the program the right parameters when it launches it. See here for info on passing arguments.
The arguments you need are probably something like
--left left.jpg --right right.jpg --method BM --ndisp 32
Note that I replaced <left-view> and <right-view> with actual image names, stripped the comments explaining each parameter (# comments start with hash), and chose some sensible options for the other parameters.
Note that if you just give the file names, the files have to be in the same directory as the working directory that VS uses to launch your executable. You can also give relative or full paths if you wish, or probably tell VS to use the folder with your images as the working directory.
I can't run openCV with VS2010. I downloaded OpenCV-2.3.1-win-superpack and extract openCV2.3.1 in C:\opencv and use CMake buide project into C:\opencv\vs2010. Next, I set include all module and lib to C:\opencv\build\x86\vc10\lib and set Additional Dependencies to
opencv_core231d.lib opencv_highgui231d.lib opencv_imgproc231d.lib opencv_features2d231d.lib opencv_calib3d231d.lib
After that I copy from C:\opencv\build\x86\vc10\bin to folder Debug in my project.
I build this code no any error.
include "stdafx.h"
include "opencv2/core/core.hpp"
include "opencv2/highgui/highgui.hpp"
int main(){
cv::Mat image = cv::imread("Desert.jpg");
cv::namedWindow("My Image");
cv::imshow("My Image", image);
cv::waitKey(5000);
return 1;
}
but when I run this code it show this error alert.
Unhandled exception at 0x0f6d49a6 in OpenCV_Helloworld.exe: 0xC0000005: Access violation reading location 0x00000018.
when I click breake it show
No Source Available
No symbols are loaded for any call stack frame. The source code cannot be displayed.
Call stack location:
KernelBase.dll!75289617()
In openCV tutorial use old version for openCV installation. So I find in google and install follow that. I'm not sure I miss take in this code or installation.
I create new Project and config like this Setup OpenCV-2.3 for Visual Studio 2010 and copy all dll to Debug folder in my Project. I build no error but when I run it show this error.
'opencv_hello.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Users\PKRU\Documents\Visual Studio 2010\Projects\opencv_hello\Debug\opencv_core231d.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'opencv_hello.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'opencv_hello.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16385_none_ebf82fc36c758ad5\comctl32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\avifil32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\msacm32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\avicap32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
'opencv_hello.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
The program '[5308] opencv_hello.exe: Native' has exited with code -1 (0xffffffff).
have you checked if the imread worked?
if ( image.data == NULL ) {
// failed
}
Go to Options>Debugging>Symbol and check 'Microsoft symbol server' as Symbol file(.pdb) locations'. This worked for me to get rid of 'Cannot find or open the PDB file' error.
Did you copy opencv_highgui231d.dll to the build output directory as well? I can see that it loads opencv_core dll but not the highgui one.