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

Commented Unassigned: No call stack for a lot of memory leaks [10606]

$
0
0
When I started using Visual Leak Detector with an application, there were about 1900 memory leaks.

By clicking at the call stack, I was able to solve more than a thousand leaks.

But then I end up with 600 memory leaks with no call stack.

Hundreds of results like these:
```

---------- Block 39495 at 0x000000002E463EF0: 256 bytes ----------
Leak Hash: 0x1C19B241, Count: 1, Total 256 bytes
Call Stack (TID 2516):
Data:
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 30 CF CD 2D 8E 01 00 00 0..-.... 0..-....
30 CF CD 2D 8E 01 00 00 CD CD CD CD CD CD CD CD 0..-.... ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........
CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ........ ........


---------- Block 39182 at 0x000000002E4EBF30: 192 bytes ----------
Leak Hash: 0xD63B514B, Count: 1, Total 192 bytes
Call Stack (TID 2516):
Data:
B0 76 C2 36 F8 7F 00 00 28 78 C2 36 F8 7F 00 00 .v.6.... (x.6....
00 00 00 00 00 00 00 00 CD CD CD CD 00 00 00 00 ........ ........
C0 76 C2 36 F8 7F 00 00 13 00 00 00 00 00 00 00 .v.6.... ........
A0 DF E4 15 8E 01 00 00 30 BF 4E 2E 8E 01 00 00 ........ 0.N.....
01 00 00 00 00 00 00 00 F8 4D 7C 16 8E 01 00 00 ........ .M|.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
CD CD CD CD 00 00 00 00 80 77 C2 36 F8 7F 00 00 ........ .w.6....
38 78 C2 36 F8 7F 00 00 00 CD CD CD CD CD CD CD 8x.6.... ........
CD CD CD CD CD CD CD CD E8 77 C2 36 F8 7F 00 00 ........ .w.6....
40 78 C2 36 F8 7F 00 00 D0 5F F6 07 8E 01 00 00 @x.6.... ._......
00 00 00 00 00 00 22 40 00 00 00 00 00 00 F0 3F ......"@ .......?
01 00 00 00 90 01 00 00 00 00 00 CD CD CD CD CD ........ ........


---------- Block 39184 at 0x000000002E4F5F30: 192 bytes ----------
Leak Hash: 0xF4224B3F, Count: 1, Total 192 bytes
Call Stack (TID 2516):
Data:
B0 76 C2 36 F8 7F 00 00 28 78 C2 36 F8 7F 00 00 .v.6.... (x.6....
00 00 00 00 00 00 00 00 CD CD CD CD 00 00 00 00 ........ ........
C0 76 C2 36 F8 7F 00 00 13 00 00 00 00 00 00 00 .v.6.... ........
A0 DF E4 15 8E 01 00 00 30 5F 4F 2E 8E 01 00 00 ........ 0_O.....
01 00 00 00 00 00 00 00 F8 4D 7C 16 8E 01 00 00 ........ .M|.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
CD CD CD CD 00 00 00 00 80 77 C2 36 F8 7F 00 00 ........ .w.6....
38 78 C2 36 F8 7F 00 00 00 CD CD CD CD CD CD CD 8x.6.... ........
CD CD CD CD CD CD CD CD E8 77 C2 36 F8 7F 00 00 ........ .w.6....
40 78 C2 36 F8 7F 00 00 E0 7F 4F 2E 8E 01 00 00 @x.6.... ..O.....
00 00 00 00 00 00 26 40 00 00 00 00 00 00 F0 3F ......&@ .......?
01 00 00 00 90 01 00 00 00 00 00 CD CD CD CD CD ........ ........


---------- Block 39185 at 0x000000002E4F7FC0: 48 bytes ----------
Leak Hash: 0x2A02B04E, Count: 1, Total 48 bytes
Call Stack (TID 2516):
Data:
D0 7F 99 0D 8E 01 00 00 07 00 00 00 00 00 00 00 ........ ........
0F 00 00 00 00 00 00 00 01 00 00 00 CD CD CD CD ........ ........
4D 61 72 6C 65 74 74 00 77 20 52 6F 6D 61 6E 00 Marlett. w.Roman.


Visual Leak Detector detected 616 memory leaks (175365 bytes).
Largest number used: 60517475 bytes.
Total allocations: 73232960 bytes.
Visual Leak Detector is now exiting.
The program '[12016] app_core_hellomultiverse.exe' has exited with code 0 (0x0).
```

I enabled /DEBUG (Full) , disabled all optimizations and inlining, tried to disable security checks, compiled both with CRTDBG.h and without it, and with _CRT_MAP_ALLOC and also without it, with no changes at this behavior. Also tried safe call stack and trace internals and self test. No changes also.

In the other hand, CRT displays many results with file paths, but they don't help so much.

Results like these:

```
Z:\ca2\app\appseed\aura/primitive/primitive.inl(72) : {17076} normal block at 0x0000018E2C824F30, 192 bytes long.
Data: < ;%1 9%1 > 98 3B 25 31 F8 7F 00 00 F0 39 25 31 F8 7F 00 00
Z:\ca2\app\appseed\aura/aura/aura/aura_command_target.h(40) : {17075} normal block at 0x0000018E2C822FE0, 24 bytes long.
Data: <8 "1 > 38 8B 22 31 F8 7F 00 00 03 00 00 00 00 00 00 00
Z:\ca2\app\appseed\aura/primitive/primitive.inl(70) : {17074} normal block at 0x0000018E2C820F20, 208 bytes long.
Data: <X -1 / , > 58 EB 2D 31 F8 7F 00 00 E0 2F 82 2C 8E 01 00 00
z:\ca2\app\appseed\aura\aura\aura\aura_allocate_heap.h(136) : {17072} normal block at 0x0000018E2A81CEF0, 256 bytes long.
Data: < * > E0 AF 81 2A 8E 01 00 00 CD CD CD CD CD CD CD CD
Z:\ca2\app\appseed\aura/primitive/primitive.inl(74) : {17071} normal block at 0x0000018E2A81AFE0, 16 bytes long.
Data: < = 2 p* > E8 3D 03 32 F8 7F 00 00 80 8C 70 2A 8E 01 00 00
z:\ca2\app\appseed\aura\aura\aura\aura_allocate_heap.h(136) : {17070} normal block at 0x0000018E2A818EF0, 256 bytes long.
Data: < > 00 00 00 00 00 00 00 00 CD CD CD CD CD CD CD CD
Z:\ca2\app\appseed\aura/primitive/primitive.inl(72) : {17068} normal block at 0x0000018E2A814F30, 192 bytes long.
Data: < ;%1 9%1 > 98 3B 25 31 F8 7F 00 00 F0 39 25 31 F8 7F 00 00
Z:\ca2\app\appseed\aura/aura/aura/aura_command_target.h(40) : {17067} normal block at 0x0000018E2A812FE0, 24 bytes long.
Data: <8 "1 > 38 8B 22 31 F8 7F 00 00 03 00 00 00 00 00 00 00

```

I am using Visual Studio 2015 Community Edition.
Comments: Had the same issue. setting ReportEncoding = unicode in vld.ini caused me other problems (dunno why but output was not redirected to my output file anymore). I modified the code to be: ``` if (wcstombs_s(&count, messagea, MAXMESSAGELENGTH + 1, messagew, _TRUNCATE) != 0) { // Failed to convert the Unicode message to ASCII. fputs("Failed to convert the Unicode message to ASCII, using std::wcout\n", stdout); std::wcout << messagew << std::endl; //assert(FALSE); // commented by Jean return; } ``` Also added #include <iostream>.

Viewing all articles
Browse latest Browse all 704

Trending Articles



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