Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all 704 articles
Browse latest View live

Commented Issue: freezing of CFileDialog DoModal with vld [9519]

$
0
0
Hi all,
I wrote it to the discussion already ( see http://vld.codeplex.com/discussions/277407 ), but here is better place.
I created a MFC application with CFileDialog (on Windows 7) and it was rarely working but in majority of cases it was freezing in DoModal function of CFileDialog.
I spent two horrible days of my life by solving of this issue.

Please fix vld somehow, it is very useful.

With regards Martin

Comments: System: Win7, VS2010 Pro, VLD 2.4rc2 I assume, __Qt__ uses some the methods mentioned above, because with VLD enabled, my simple open file dialog freezes the application.

Edited Unassigned: VLD interferes with GetLastError( ) [10586]

$
0
0
Hi! [Here](https://msdn.microsoft.com/en-us/library/windows/desktop/aa384102(v=vs.85).aspx) Microsoft recommends the following trick:
```
WinHttpQueryHeaders( hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF,
WINHTTP_HEADER_NAME_BY_INDEX, NULL,
&dwSize, WINHTTP_NO_HEADER_INDEX);
// Allocate memory for the buffer.
if( GetLastError( ) == ERROR_INSUFFICIENT_BUFFER )
{
lpOutBuffer = new WCHAR[dwSize/sizeof(WCHAR)];
// Now, use WinHttpQueryHeaders to retrieve the header.
bResults = WinHttpQueryHeaders( hRequest,
WINHTTP_QUERY_RAW_HEADERS_CRLF,
WINHTTP_HEADER_NAME_BY_INDEX,
lpOutBuffer, &dwSize,
WINHTTP_NO_HEADER_INDEX);
}
```
We found that if the file has
```
#include <vld.h>
...
VLDDisable();
..
VLDEnable();
```
The function GetLastError() of Windows API returns 0 instead of ERROR_INSUFFICIENT_BUFFER. __Somehow the last error is cleared by VLD__. We found a workaround, we use
```
if(dwSize > 0 )
```
instead of
```
if( GetLastError( ) == ERROR_INSUFFICIENT_BUFFER )
```
But others may suffer. Thanks, Levi

New Post: VLD 2.4RC2 - SQLDriverConnect - locked...

$
0
0
Hi,

First at all thank you for this amazing system to detect memory leak.
I am checking the 2.4RC2 with vs2013 express.

Do you know if there is any limitation with the ODBC API SQLDriverConnectA.


Thank you in advance
regards

Source code checked in, #40532d570659d9559fa03169cc25c1bfe9ddcfd4

$
0
0
Use CaptureStackBackTrace in FastCallStack for x86

New Post: VLD 2.4RC2 - SQLDriverConnect - locked...

$
0
0
More info.

The SqlDriverConnectA method is wrapped into a function named connectSQL of a static lib.

When the connectSQL method is execute into a Thread : the process is locking
When the connectSQL method is execute directly : works fine but appear a lot of warning like


WARNING: Visual Leak Detector: Failed to unload the symbols for sqlsrv32.rll. Function names and line numbers shown in the memory leak report for sqlsrv32.rll may be inaccurate.

WARNING: Visual Leak Detector: A module, sqlsrv32.dll, included in memory leak detection
does not have any debugging symbols available, or they could not be located.
Function names and/or line numbers for this module may not be available.

WARNING: Visual Leak Detector: A module, dssenh.dll, included in memory leak detection
does not have any debugging symbols available, or they could not be located.
Function names and/or line numbers for this module may not be available.



Questions?
Anyone know if I have to include "vld.h" to the lib? or It´s a problem if the threads, odbc API ...

Created Unassigned: Visual Leak Detector reporting strange leaks in CRT module of VC++ [10587]

$
0
0
I've just now installed Visual Leak Detector (2.3) on Windows 8. I tested it with blank CRT program (in Visual Studio 2012) that does nothing.

```
#include <vld.h>

int main(int argc, char** argv)
{
return 0;
}

```
When I run it VLD reports strange leaks in vc++ crt module:

> Visual Leak Detector Version 2.3 installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 31 at 0x0000000052C07530: 70 bytes ----------
Call Stack:
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\stdenvp.c (127): my_application.exe!_setenvp + 0x27 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (223): my_application.exe!__tmainCRTStartup + 0x5 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (164): my_application.exe!mainCRTStartup
0x00000000FAF8167E (File and line number not available): KERNEL32.DLL!BaseThreadInitThunk + 0x1A bytes
0x00000000FD8CC3F1 (File and line number not available): ntdll.dll!RtlUserThreadStart + 0x21 bytes
Data:
20 B5 C0 52 50 00 00 00 50 92 C0 52 50 00 00 00 ...RP... P..RP...
20 91 DD E1 F6 07 00 00 7E 00 00 00 02 00 00 00 ........ ~.......
12 00 00 00 00 00 00 00 1F 00 00 00 FD FD FD FD ........ ........
50 52 4F 43 45 53 53 4F 52 5F 4C 45 56 45 4C 3D PROCESSO R_LEVEL=
36 00 FD FD FD FD 6....... ........


---------- Block 40 at 0x0000000052C075D0: 72 bytes ----------
Call Stack:
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\stdenvp.c (127): my_application.exe!_setenvp + 0x27 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (223): my_application.exe!__tmainCRTStartup + 0x5 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (164): my_application.exe!mainCRTStartup
0x00000000FAF8167E (File and line number not available): KERNEL32.DLL!BaseThreadInitThunk + 0x1A bytes
0x00000000FD8CC3F1 (File and line number not available): ntdll.dll!RtlUserThreadStart + 0x21 bytes
Data:
F0 94 C0 52 50 00 00 00 20 76 C0 52 50 00 00 00 ...RP... .v.RP...
20 91 DD E1 F6 07 00 00 7E 00 00 00 02 00 00 00 ........ ~.......
14 00 00 00 00 00 00 00 28 00 00 00 FD FD FD FD ........ (.......
53 45 53 53 49 4F 4E 4E 41 4D 45 3D 43 6F 6E 73 SESSIONN AME=Cons
6F 6C 65 00 FD FD FD FD ole..... ........


---------- Block 41 at 0x0000000052C07620: 67 bytes ----------
Call Stack:
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\stdenvp.c (127): my_application.exe!_setenvp + 0x27 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (223): my_application.exe!__tmainCRTStartup + 0x5 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (164): my_application.exe!mainCRTStartup
0x00000000FAF8167E (File and line number not available): KERNEL32.DLL!BaseThreadInitThunk + 0x1A bytes
0x00000000FD8CC3F1 (File and line number not available): ntdll.dll!RtlUserThreadStart + 0x21 bytes
Data:
D0 75 C0 52 50 00 00 00 D0 96 C0 52 50 00 00 00 .u.RP... ...RP...
20 91 DD E1 F6 07 00 00 7E 00 00 00 02 00 00 00 ........ ~.......
0F 00 00 00 00 00 00 00 29 00 00 00 FD FD FD FD ........ ).......
53 79 73 74 65 6D 44 72 69 76 65 3D 43 3A 00 FD SystemDr ive=C:..
FD FD FD ........ ........


---------- Block 43 at 0x0000000052C07670: 65 bytes ----------
Call Stack:
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\stdenvp.c (127): my_application.exe!_setenvp + 0x27 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (223): my_application.exe!__tmainCRTStartup + 0x5 bytes
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c (164): my_application.exe!mainCRTStartup
0x00000000FAF8167E (File and line number not available): KERNEL32.DLL!BaseThreadInitThunk + 0x1A bytes
0x00000000FD8CC3F1 (File and line number not available): ntdll.dll!RtlUserThreadStart + 0x21 bytes
Data:
D0 96 C0 52 50 00 00 00 C0 76 C0 52 50 00 00 00 ...RP... .v.RP...
20 91 DD E1 F6 07 00 00 7E 00 00 00 02 00 00 00 ........ ~.......
0D 00 00 00 00 00 00 00 2B 00 00 00 FD FD FD FD ........ +.......
54 45 4D 50 3D 46 3A 5C 54 45 4D 50 00 FD FD FD TEMP=F:\ TEMP....
FD ........ ........


Visual Leak Detector detected 48 memory leaks (6044 bytes).
Largest number used: 15094 bytes.
Total allocations: 25276 bytes.
Visual Leak Detector is now exiting.

I want to suppress these lines from appearing it to report (If they genuinely are not leaks)

Has anyone experienced this and know how to sort out?

New Comment on "Configuration Options"

$
0
0
We must also note that, in case of Windows 8 (and above) systems, changes made to VLD.INI from installation directory (e.g. C:\Program Files (x86)\Visual Leak Detector) may not have any effect. Because program might not have access to that folder (unlike on Windows XP). In that case, we must have to have local copy on VLD.INI or run the program under administrator privilege. I was trying to disable VLD through VLD and struggled a lot to figure this out.

Commented Issue: Static CRT leaks? [10446]

$
0
0
I use Visual Studio 2012 and VLD 2.2.3.
Compile option /MTd.
Memory leak is reported with the next code.

```
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
```

VisualLeakDetector::_HeapCreate() dose not seem to be called...

*I use machine translation, I cannot express it well.
Comments: Hi, I am facing this same issue. May I please know from where can I download this patch 367d5721978b you mentioned?

Commented Issue: Static CRT leaks? [10446]

$
0
0
I use Visual Studio 2012 and VLD 2.2.3.
Compile option /MTd.
Memory leak is reported with the next code.

```
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
```

VisualLeakDetector::_HeapCreate() dose not seem to be called...

*I use machine translation, I cannot express it well.
Comments: Ok I just downloaded v2.4rc2 (vld-2.4rc2-setup.exe) and this issue appears no more in that! (I had downloaded v2.3 because it has been marked stable)

Commented Issue: freezing of CFileDialog DoModal with vld [9519]

$
0
0
Hi all,
I wrote it to the discussion already ( see http://vld.codeplex.com/discussions/277407 ), but here is better place.
I created a MFC application with CFileDialog (on Windows 7) and it was rarely working but in majority of cases it was freezing in DoModal function of CFileDialog.
I spent two horrible days of my life by solving of this issue.

Please fix vld somehow, it is very useful.

With regards Martin

Comments: This issue has been fixed in [Pull Request 8453](https://vld.codeplex.com/SourceControl/network/forks/ioannise/vld/contribution/8453) Comment here if this fixes your issue to facilitate review process.

Commented Issue: Failed to register COM dll [6359]

$
0
0
When i include Visual leak detector and build the source code than it is unable to register the dll on XP and on Windows 7, regsvr32.exe crashes.
Environment : VS2008 , OS is XP
error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.
Environment : VS2008 , OS is Windows 7
error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry and after that regsvr32 crashes to regsiter the dll.
Thanks in advance.

Comments: This issue has been fixed in [Pull Request 8453](https://vld.codeplex.com/SourceControl/network/forks/ioannise/vld/contribution/8453) Comment here if the PR fixes your issue to facilitate review process.

Commented Issue: Application hangs in GetOpenFileName/GetSaveFileName [9859]

$
0
0
With VLD, when I call GetSaveFileName, my application hangs. It seems to be stuck in ieframe.dll.

GetSaveFileName loads several DLLs, (including Tortoise SVN) then it stops with ieframe.
Comments: This issue has been fixed in [Pull Request 8453](https://vld.codeplex.com/SourceControl/network/forks/ioannise/vld/contribution/8453) Comment here if the PR fixes your issue to facilitate review process.

Commented Unassigned: FolderBrowserDialog issue [10544]

$
0
0
Hi,

I have an issue using FolderBrowserDialog - ShowDialog() function - when using VLD 2.3 in debug mode.

System details:
Windows 8 Pro 64-bit, Visual Studio 2012 Ultimate (Update 2). Winforms C++/CLI application.

Error:
Whenever calling ShowDialog() AFTER setting SelectedPath property, an empty 'Browse For Folder' dialog box is shown, and the program crashes :(
It then needs a Shift-F5 to recover to the IDE.

Deactivating VLD by commenting '#include vld.h', the error goes away.

For me this is quite a critical error as I cannot use VLD (which I really like) in combination with a FolderBrowserDialog...

Thanks for your time and greetings,
Auke Nauta



Comments: This issue has been fixed in [Pull Request 8453](https://vld.codeplex.com/SourceControl/network/forks/ioannise/vld/contribution/8453) Comment here if the PR fixes your issue to facilitate review process.

Source code checked in, #750564dd6531ad160aa5d078307026308a6b58c2

Source code checked in, #451cb8341fcfa04272f1631beb7dff49cce636df


Source code checked in, #44acbfa35f09e10bb3a186e21816ac33e8548d9f

Source code checked in, #cc6f50d5dfda75ce165817e6d4d4d5382493b9f1

$
0
0
TEST(CorruptionDeathTest, HeapMismatch) fixed in release

Source code checked in, #0bdca754b5682fd99b0552ca32bacf38c7de6dd8

$
0
0
Renamed solution configuration for msbuild

Source code checked in, #45ec65de5b4a95dafcb626077fef76cfada73f46

Source code checked in, #a2adea36a58e2ed9e73b33297c1320ee1095abbe

$
0
0
Testing with VldStackWalkMethod = safe added
Viewing all 704 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>