Error 'Exception thrown: write access violation' with sample objectDetection.cpp [closed]

asked 2017-06-22 12:16:48 -0600

danieltak gravatar image

updated 2017-06-22 12:34:24 -0600

I am learning OpenCV and was testing: https://github.com/opencv/opencv/blob...

When i run Debug on Local Windows Debugger the program runs smoothly and make the face and eye Detection However, when i tried to run Release on Local Windows Debugger, i receive this: VS window

The error in on line 1692 of types.hpp https://github.com/opencv/opencv/blob...

And this message appeared:

Exception thrown: write access violation. this was 0x10.

error window

I read somewhere that it can be a pointer error.

Please help me! Thanks in advance.

Edit: Output Debug

    'teste1.exe' (Win32): Loaded 'C:\Users\User\Documents\Visual Studio 2015\Projects\teste1\x64\Release\teste1.exe'. Symbols loaded.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\opencv_git\Mybuild\install\x64\vc14\bin\opencv_core320d.dll'. Symbols loaded.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\concrt140d.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\opencv_git\Mybuild\install\x64\vc14\bin\opencv_highgui320d.dll'. Symbols loaded.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll'. Cannot find or open the PDB file.
'teste1.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'teste1 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2017-06-22 13:01:49.319372

Comments

please remove the useless screenshots, and replace them with a text version of your code and the resp. error.

and usually, problems like yours are due to getting debug and release libs wrong, please check.

berak gravatar imageberak ( 2017-06-22 12:26:10 -0600 )edit

The libraries and includes are the same for both Debug and Release, i think it is strange that just Release got this Call Stack

danieltak gravatar imagedanieltak ( 2017-06-22 12:37:34 -0600 )edit
1

yea, that's plain wrong, and the cause of your error.

strictly use libs with 'd' at the end for debug, and without for release.

berak gravatar imageberak ( 2017-06-22 12:43:41 -0600 )edit

Oh, that was it, didn't know. Thanks you! Been on it the hole day and decide to ask here. Really thanks

danieltak gravatar imagedanieltak ( 2017-06-22 12:54:39 -0600 )edit