Memory leaks with VST plug-ins and Windows XP


#1

Hello Jules !

I have found two memory leaks in a plug-in I am developing with Visual Studio 2008 and Windows XP without being able to solve them. After a few researches, I have seen that all the VST plug-ins generated by the IntroJucer have exactly the same problem, as well as the demo VST plug-in from the extra folder (with the DirectWrite macro disabled)

'reaper.exe': Loaded 'C:\Program Files\REAPER\reaper.exe', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\user32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\secur32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\shell32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\ole32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\winmm.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\dsound.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\version.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\imm32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME' 'reaper.exe': Loaded 'C:\Program Files\REAPER\rearoute.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\elastique.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\elastique2.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\DiracLE.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\soundtouch.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\jsfx.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv' 'reaper.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv' 'reaper.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\midimap.dll' 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_cd.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_csurf.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_ddp.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_explorer.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_flac.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_midi.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_mp3dec.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_ogg.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_rex.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_video.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\FFmpeg.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_wave.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\Program Files\REAPER\Plugins\reaper_wavpack.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\WINDOWS\system32\perfproc.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\clbcatq.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\comres.dll' 'reaper.exe': Loaded 'C:\Program Files\ASIO4ALL v2\asio4all.dll', Binary was not built with debug information. 'reaper.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll' 'reaper.exe': Loaded 'C:\Program Files\steinberg\vstplugins\XXXXXXXXXX.dll', Symbols loaded. 'reaper.exe': Loaded 'C:\WINDOWS\system32\wininet.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\normaliz.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\urlmon.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\iertutil.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\cscui.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\cscdll.dll' 'reaper.exe': Loaded 'C:\Program Files\SugarSync\SugarSyncShellExt.dll' 'reaper.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcr80.dll' 'reaper.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcp80.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\iphlpapi.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\mscms.dll' 'reaper.exe': Loaded 'C:\WINDOWS\system32\winspool.drv' The thread 'Win32 Thread' (0xca8) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x948) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xa10) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xaec) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xe60) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xf8c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xda0) has exited with code 0 (0x0). 'reaper.exe': Unloaded 'C:\WINDOWS\system32\iphlpapi.dll' The thread 'Win32 Thread' (0x74c) has exited with code 0 (0x0). Detected memory leaks! Dumping objects -> {3220} normal block at 0x04AC46B0, 8 bytes long. Data: < Q{ > E4 51 7B 04 01 00 00 00 Object dump complete. Detected memory leaks! Dumping objects -> {3220} normal block at 0x04AC46B0, 8 bytes long. Data: < Q{ > E4 51 7B 04 01 00 00 00 Object dump complete. 'reaper.exe': Unloaded 'C:\Program Files\steinberg\vstplugins\XXXXXXXXXXXXX.dll' 'reaper.exe': Unloaded 'C:\WINDOWS\system32\wininet.dll' 'reaper.exe': Unloaded 'C:\WINDOWS\system32\urlmon.dll' 'reaper.exe': Unloaded 'C:\WINDOWS\system32\iertutil.dll' 'reaper.exe': Unloaded 'C:\WINDOWS\system32\normaliz.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_cd.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_csurf.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_ddp.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_explorer.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_flac.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_midi.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_mp3dec.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_ogg.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_rex.dll' The thread 'Win32 Thread' (0x678) has exited with code 0 (0x0). 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_video.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_wave.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\reaper_wavpack.dll' 'reaper.exe': Unloaded 'C:\Program Files\REAPER\Plugins\jsfx.dll' The thread 'Win32 Thread' (0xaf0) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x484) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xd84) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xdb4) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x9a0) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x5c8) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x1e4) has exited with code 0 (0x0). The program '[3044] reaper.exe: Native' has exited with code 0 (0x0).

I have the last version of JUCE.

Am I the only one with this problem ? Is it normal or not ?

Thanks a lot !


#2

Anyone has the same problem with Windows XP / the DemoPlugin ?


#3

Looks like some messages are leaking.
There are a few threads in the forum talking about that. As far a I remember it is really hard
or may impossible to fix.


#4

Yeah, you’re only leaking two 8-byte objects, which are almost certainly just win32 message blocks. Don’t worry about it - you’d need to load/unload your plugin millions of times before the amount of leaked memory became a problem!


#5

Thanks for the replies :wink: