内存泄漏在一个系统上但在另一个系统上没有

时间:2016-05-19 12:02:54

标签: c++ visual-studio qt opencv

我有一个应用程序,我已经在我的计算机上构建。它使用Qt和OpenCV。它是64位的构建。我在Visual Studio 2013中编写了它,然后使用InstallForge创建了一个安装程序(为win7,8,10构建)。 事先我为我的exe运行了// Override the default allowed tags in wp_nav_menu() function custom_nav_menu_container_allowedtags( $allowed_tags ) { $allowed_tags[] = 'aside'; return $allowed_tags; } add_filter( 'wp_nav_menu_container_allowedtags', 'custom_nav_menu_container_allowedtags' ); ,并将其中的所有内容包含在安装程序以及windeployqt中。在我的系统(win7)和另一个系统(win10)上安装应用程序工作正常。那个其他系统没有安装qt和opencv。

在程序中我有几个步骤。首先,我从外面拖放一个图像,然后我在背景中做一些选择(拖动和调整rects的大小)图像(标记事物)。到目前为止,这都是Qt。在下一步中,我想将给定图像的大小调整为opencv_world300.dll,其中X取决于宽高比。这是崩溃发生在另一个系统上的地方。

我在另一个系统上将我的exe添加到WinDbg并运行调试器。结果如下。

X * 800

据我所知,我在CommandLine: "C:\Program Files\FaceModifier\FaceModifier.exe" Symbol search path is: srv* Executable search path is: ModLoad: 00007ff7`5b020000 00007ff7`5b10f000 FaceModifier.exe ModLoad: 00007ff8`c6f80000 00007ff8`c7141000 ntdll.dll ModLoad: 00007ff8`a7b00000 00007ff8`a7b6d000 C:\WINDOWS\system32\verifier.dll Page heap: pid 0x8B0: page heap enabled with flags 0x3. AVRF: FaceModifier.exe: pid 0x8B0: flags 0x81643027: application verifier enabled ModLoad: 00007ff8`a99a0000 00007ff8`a99dd000 C:\WINDOWS\SYSTEM32\vrfcore.dll ModLoad: 00007ff8`a40e0000 00007ff8`a414c000 C:\WINDOWS\SYSTEM32\vfbasics.dll ModLoad: 00007ff8`c46f0000 00007ff8`c479d000 C:\WINDOWS\system32\KERNEL32.DLL ModLoad: 00007ff8`c3630000 00007ff8`c3818000 C:\WINDOWS\system32\KERNELBASE.dll ModLoad: 00007ff8`c44f0000 00007ff8`c4597000 C:\WINDOWS\system32\ADVAPI32.dll ModLoad: 00007ff8`c4450000 00007ff8`c44ed000 C:\WINDOWS\system32\msvcrt.dll ModLoad: 00000000`52f80000 00000000`5343a000 C:\Program Files\FaceModifier\Qt5Core.dll ModLoad: 00007ff8`c66c0000 00007ff8`c6816000 C:\WINDOWS\system32\USER32.dll ModLoad: 00007ff8`c6d80000 00007ff8`c6f06000 C:\WINDOWS\system32\GDI32.dll ModLoad: 00007ff8`c4e30000 00007ff8`c638c000 C:\WINDOWS\system32\SHELL32.dll ModLoad: 00007ff8`c40a0000 00007ff8`c40e3000 C:\WINDOWS\system32\cfgmgr32.dll ModLoad: 00007ff8`c3820000 00007ff8`c3e64000 C:\WINDOWS\system32\windows.storage.dll ModLoad: 00007ff8`c6830000 00007ff8`c6aad000 C:\WINDOWS\system32\combase.dll ModLoad: 00007ff8`c6d20000 00007ff8`c6d7b000 C:\WINDOWS\system32\sechost.dll ModLoad: 00007ff8`c65a0000 00007ff8`c66bc000 C:\WINDOWS\system32\RPCRT4.dll ModLoad: 00007ff8`c6bc0000 00007ff8`c6d03000 C:\WINDOWS\system32\ole32.dll ModLoad: 00007ff8`c4d60000 00007ff8`c4e21000 C:\WINDOWS\system32\OLEAUT32.dll ModLoad: 00007ff8`95410000 00007ff8`95945000 C:\Program Files\FaceModifier\Qt5Gui.dll ModLoad: 00000000`52a50000 00000000`52f7a000 C:\Program Files\FaceModifier\Qt5Widgets.dll ModLoad: 00007ff8`933f0000 00007ff8`95410000 C:\Program Files\FaceModifier\opencv_world300.dll ModLoad: 00007ff8`a3440000 00007ff8`a34e6000 C:\WINDOWS\SYSTEM32\MSVCP120.dll ModLoad: 00007ff8`a0160000 00007ff8`a024f000 C:\WINDOWS\SYSTEM32\MSVCR120.dll ModLoad: 00007ff8`928f0000 00007ff8`92e58000 C:\WINDOWS\SYSTEM32\mfc120u.dll ModLoad: 00007ff8`c43f0000 00007ff8`c4442000 C:\WINDOWS\system32\SHLWAPI.dll ModLoad: 00007ff8`c4650000 00007ff8`c468b000 C:\WINDOWS\system32\IMM32.dll ModLoad: 00007ff8`aaed0000 00007ff8`aaef9000 C:\WINDOWS\SYSTEM32\MSVFW32.dll ModLoad: 00007ff8`b14a0000 00007ff8`b14c0000 C:\WINDOWS\SYSTEM32\AVIFIL32.dll ModLoad: 00007ff8`ac6a0000 00007ff8`ac6b8000 C:\WINDOWS\SYSTEM32\AVICAP32.dll ModLoad: 00007ff8`b1200000 00007ff8`b12aa000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10586.0_none_396e892957c7fb25\COMCTL32.dll ModLoad: 00007ff8`c1f20000 00007ff8`c1fb6000 C:\WINDOWS\SYSTEM32\UxTheme.dll ModLoad: 00007ff8`c17f0000 00007ff8`c1813000 C:\WINDOWS\SYSTEM32\WINMM.dll ModLoad: 00007ff8`bb0f0000 00007ff8`bb10c000 C:\WINDOWS\SYSTEM32\MSACM32.dll ModLoad: 00007ff8`c17c0000 00007ff8`c17ec000 C:\WINDOWS\SYSTEM32\WINMMBASE.dll ModLoad: 00007ff8`c3f20000 00007ff8`c3f8a000 C:\WINDOWS\system32\bcryptPrimitives.dll ModLoad: 00007ff8`c3610000 00007ff8`c361f000 C:\WINDOWS\system32\kernel.appcore.dll ModLoad: 00007ff8`c42c0000 00007ff8`c4375000 C:\WINDOWS\system32\shcore.dll ModLoad: 00007ff8`c35c0000 00007ff8`c360b000 C:\WINDOWS\system32\powrprof.dll ModLoad: 00007ff8`c35a0000 00007ff8`c35b4000 C:\WINDOWS\system32\profapi.dll ModLoad: 00007ff8`c4380000 00007ff8`c43eb000 C:\WINDOWS\system32\WS2_32.dll ModLoad: 00007ff8`bda90000 00007ff8`bdaab000 C:\WINDOWS\SYSTEM32\MPR.dll ModLoad: 00000000`527f0000 00000000`52a50000 C:\Program Files\FaceModifier\icuin53.dll ModLoad: 00000000`52640000 00000000`527eb000 C:\Program Files\FaceModifier\icuuc53.dll ModLoad: 0000026f`35f60000 0000026f`373ea000 C:\Program Files\FaceModifier\icudt53.dll (8b0.13e4): Break instruction exception - code 80000003 (first chance) ntdll!LdrpDoDebuggerBreak+0x30: 00007ff8`c704aa60 cc int 3 0:000> g ModLoad: 00007ff8`c0340000 00007ff8`c034a000 C:\WINDOWS\system32\version.dll ModLoad: 00007ff8`c3040000 00007ff8`c304b000 C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL Qt: Untested Windows version 10.0 detected! ModLoad: 00007ff8`a79d0000 00007ff8`a7af5000 C:\Program Files\FaceModifier\platforms\qwindows.dll ModLoad: 00007ff8`c1470000 00007ff8`c1492000 C:\WINDOWS\SYSTEM32\dwmapi.dll ModLoad: 00007ff8`c4c00000 00007ff8`c4d5a000 C:\WINDOWS\system32\MSCTF.dll ModLoad: 00007ff8`c45a0000 00007ff8`c4647000 C:\WINDOWS\system32\clbcatq.dll ModLoad: 00007ff8`b78d0000 00007ff8`b791a000 C:\WINDOWS\system32\dataexchange.dll ModLoad: 00007ff8`c11c0000 00007ff8`c1468000 C:\WINDOWS\system32\d3d11.dll ModLoad: 00007ff8`c0c70000 00007ff8`c0d12000 C:\WINDOWS\system32\dxgi.dll ModLoad: 00007ff8`c19a0000 00007ff8`c1a83000 C:\WINDOWS\system32\dcomp.dll ModLoad: 00007ff8`c20c0000 00007ff8`c21c0000 C:\WINDOWS\system32\twinapi.appcore.dll ModLoad: 00007ff8`c34d0000 00007ff8`c34f9000 C:\WINDOWS\system32\bcrypt.dll ModLoad: 00007ff8`ba140000 00007ff8`ba151000 C:\Program Files\FaceModifier\imageformats\qdds.dll ModLoad: 00007ff8`ba130000 00007ff8`ba13d000 C:\Program Files\FaceModifier\imageformats\qgif.dll ModLoad: 00007ff8`b9be0000 00007ff8`b9bef000 C:\Program Files\FaceModifier\imageformats\qicns.dll ModLoad: 00007ff8`b9bd0000 00007ff8`b9bdd000 C:\Program Files\FaceModifier\imageformats\qico.dll ModLoad: 00007ff8`ac6d0000 00007ff8`ac74b000 C:\Program Files\FaceModifier\imageformats\qjp2.dll ModLoad: 00007ff8`b29a0000 00007ff8`b29df000 C:\Program Files\FaceModifier\imageformats\qjpeg.dll ModLoad: 00007ff8`ab2e0000 00007ff8`ab328000 C:\Program Files\FaceModifier\imageformats\qmng.dll ModLoad: 00007ff8`b9bc0000 00007ff8`b9bcc000 C:\Program Files\FaceModifier\imageformats\qsvg.dll ModLoad: 00000000`525e0000 00000000`52631000 C:\Program Files\FaceModifier\Qt5Svg.dll ModLoad: 00007ff8`b9bb0000 00007ff8`b9bbc000 C:\Program Files\FaceModifier\imageformats\qtga.dll ModLoad: 00007ff8`ab280000 00007ff8`ab2dc000 C:\Program Files\FaceModifier\imageformats\qtiff.dll ModLoad: 00007ff8`b5aa0000 00007ff8`b5aaa000 C:\Program Files\FaceModifier\imageformats\qwbmp.dll ModLoad: 00007ff8`a7970000 00007ff8`a79cd000 C:\Program Files\FaceModifier\imageformats\qwebp.dll ModLoad: 00007ff8`b6dc0000 00007ff8`b7034000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.0_none_8c15ae12515e1c22\comctl32.dll ModLoad: 00007ff8`c0ab0000 00007ff8`c0c61000 C:\WINDOWS\SYSTEM32\WindowsCodecs.dll ModLoad: 00007ff8`ba110000 00007ff8`ba126000 C:\WINDOWS\SYSTEM32\OpenCL.dll ModLoad: 00007ff8`8ef30000 00007ff8`91cfa000 C:\WINDOWS\SYSTEM32\amdocl64.dll ModLoad: 00007ff8`c47b0000 00007ff8`c4bd9000 C:\WINDOWS\system32\SETUPAPI.dll ModLoad: 00007ff8`aba00000 00007ff8`abb29000 C:\WINDOWS\SYSTEM32\OPENGL32.dll ModLoad: 00007ff8`aa650000 00007ff8`aa7dc000 C:\WINDOWS\SYSTEM32\dbghelp.dll ModLoad: 00007ff8`b5910000 00007ff8`b593e000 C:\WINDOWS\SYSTEM32\GLU32.dll ModLoad: 00007ff8`ab900000 00007ff8`ab9fa000 C:\WINDOWS\SYSTEM32\DDRAW.dll ModLoad: 00007ff8`ba100000 00007ff8`ba108000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll ModLoad: 00007ff8`aaf00000 00007ff8`ab041000 C:\WINDOWS\SYSTEM32\atiadlxx.DLL ModLoad: 00007ff8`c6d10000 00007ff8`c6d18000 C:\WINDOWS\system32\PSAPI.DLL ModLoad: 00007ff8`c14a0000 00007ff8`c1626000 C:\WINDOWS\SYSTEM32\PROPSYS.dll ModLoad: 00007ff8`c2d00000 00007ff8`c2d1f000 C:\WINDOWS\SYSTEM32\USERENV.dll ModLoad: 00007ff8`c1710000 00007ff8`c1723000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll ModLoad: 00007ff8`bd7c0000 00007ff8`bd7f8000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL ModLoad: 00007ff8`c2070000 00007ff8`c2097000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll ModLoad: 00007ff8`c3f90000 00007ff8`c3fe5000 C:\WINDOWS\system32\WINTRUST.dll ModLoad: 00007ff8`c3620000 00007ff8`c3630000 C:\WINDOWS\system32\MSASN1.dll ModLoad: 00007ff8`c40f0000 00007ff8`c42b8000 C:\WINDOWS\system32\CRYPT32.dll ModLoad: 00007ff8`8d470000 00007ff8`8ef29000 C:\WINDOWS\SYSTEM32\amdocl12cl64.dll ModLoad: 00007ff8`b4a00000 00007ff8`b4a2c000 C:\WINDOWS\SYSTEM32\atig6txx.dll ======================================= VERIFIER STOP 0000000000000900: pid 0x8B0: A heap allocation was leaked. 0000026F45B0CD20 : Address of the leaked allocation. Run !heap -p -a <address> to get additional information about the allocation. 0000026F2F1DC4D0 : Address to the allocation stack trace. Run dps <address> to view the allocation stack. 0000026F45A7FFD8 : Address of the owner dll name. Run du <address> to read the dll name. 00007FF8B4A00000 : Base of the owner dll. Run .reload <dll_name> = <address> to reload the owner dll. Use 'lm' to get more information about the loaded and unloaded modules. ======================================= This verifier stop is continuable. After debugging it use `go' to continue. ======================================= (8b0.13e4): Break instruction exception - code 80000003 (first chance) vrfcore!VerifierStopMessageEx+0x6d0: 00007ff8`a99a2190 cc int 3 0:000> !heap -p -a 0000026F45B0CD20 address 0000026f45b0cd20 found in _DPH_HEAP_ROOT @ 26f30791000 in busy allocation ( DPH_HEAP_BLOCK: UserAddr UserSize - VirtAddr VirtSize) 26f3ee909c0: 26f45b0cd20 2e0 - 26f45b0c000 2000 *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\SYSTEM32\atig6txx.dll - ? atig6txx!XopOpenLinkedAdapter+26b8 00007ff8c70125c7 ntdll!RtlDebugAllocateHeap+0x0000000000000047 00007ff8c6fa7cce ntdll!RtlpAllocateHeap+0x00000000000000ee 00007ff8c6fa5c5f ntdll!RtlpAllocateHeapInternal+0x000000000000064f 00007ff8a99ac016 vrfcore!VfCoreRtlAllocateHeap+0x0000000000000036 00007ff8a40f04a8 vfbasics!AVrfpRtlAllocateHeap+0x0000000000000108 00007ff8b4a15e27 atig6txx!XopOpenLinkedAdapter+0x000000000000c46f 00007ff8b4a15cf7 atig6txx!XopOpenLinkedAdapter+0x000000000000c33f 00007ff8b4a06e4b atig6txx!SetThunkProxyBypassMode+0x0000000000002d0f 00007ff8b4a04124 atig6txx!GetD3DKMTProcAddress+0x0000000000000038 *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\SYSTEM32\amdocl64.dll - 00007ff88efa6b2a amdocl64+0x0000000000076b2a 00007ff88efa6591 amdocl64+0x0000000000076591 00007ff88ef88cfb amdocl64+0x0000000000058cfb 00007ff88ef8f181 amdocl64+0x000000000005f181 00007ff88efa119b amdocl64+0x000000000007119b 00007ff88f17f610 amdocl64!clSetKernelExecInfo+0x000000000002d380 00007ff88f17b66b amdocl64!clSetKernelExecInfo+0x00000000000293db 00007ff88f15f7e2 amdocl64!clSetKernelExecInfo+0x000000000000d552 00007ff88f153225 amdocl64!clSetKernelExecInfo+0x0000000000000f95 00007ff88f144c67 amdocl64!clIcdGetPlatformIDsKHR+0x0000000000000027 *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\SYSTEM32\OpenCL.dll - 00007ff8ba1110c5 OpenCL+0x00000000000010c5 00007ff8ba1133b1 OpenCL!clWaitForEvents+0x0000000000000191 00007ff8c6fd44b1 ntdll!RtlRunOnceExecuteOnce+0x0000000000000091 00007ff8c3683d4a KERNELBASE!InitOnceExecuteOnce+0x000000000000000a 00007ff8ba1132ae OpenCL!clWaitForEvents+0x000000000000008e 00007ff8ba111042 OpenCL+0x0000000000001042 00007ff8ba112cdc OpenCL!clGetPlatformIDs+0x000000000000001c *** WARNING: Unable to verify checksum for C:\Program Files\FaceModifier\opencv_world300.dll *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\FaceModifier\opencv_world300.dll - 00007ff8941d37ad opencv_world300!cv::ocl::haveOpenCL+0x000000000000002d 00007ff8941dbefe opencv_world300!cv::ocl::useOpenCL+0x000000000000002e 00007ff8943a2f46 opencv_world300!cv::resize+0x0000000000000296 *** WARNING: Unable to verify checksum for FaceModifier.exe 00007ff75b04379e FaceModifier!Normalizer::normalize+0x000000000000054e 00007ff75b0b4d00 FaceModifier!FaceModifier::processImage+0x00000000000003b0 00007ff75b041bcc FaceModifier!FaceModifier::confirmSelection+0x00000000000000fc 中调用的cv::resize存在问题。我看了一下它,建议不要使用相同的cv :: Mat进行输入和输出,所以我改变了,但它仍然在那一点上崩溃。我的函数看起来像这样(调整大小在中间):

Normalizer::normalize

似乎仍有问题,但我不知道它是什么。

0 个答案:

没有答案