Memory leaks in 6.9.1 that weren't there in 6.9.0
-
Building my code in Debug mode on WIndows uses Visual Leak Detector, which has proven invaluable over the years in detecting memory leaks.
Running a Windows Debug build built with 6.9.0 and then closing the application I get:
The thread 25544 has exited with code 0 (0x0). No memory leaks detected. Visual Leak Detector is now exiting. The program '[63732] DeepSkyStacker.exe' has exited with code 0 (0x0).
If OTOH I build with 6.9.1 it seems that Qt isn't doing its memory cleanup.
The thread 56164 has exited with code 0 (0x0). WARNING: Visual Leak Detector detected memory leaks! ---------- Block 623 at 0x000000000293B000: 48 bytes ---------- Leak Hash: 0x03B19E03, Count: 1, Total 48 bytes Call Stack (TID 68304): ntdll.dll!RtlAllocateHeap() clbcatq.dll!0x00007FFE66085F8F() combase.dll!0x00007FFE674049A1() combase.dll!CoGetModuleType() + 0x6E5A bytes combase.dll!CLSIDFromProgID() + 0xA4B bytes combase.dll!RoGetActivationFactory() + 0x352 bytes combase.dll!RoGetActivationFactory() + 0x5F bytes qwindowsd.dll!0x00007FFD2BF81530() qwindowsd.dll!0x00007FFD2BF81330() qwindowsd.dll!0x00007FFD2BF81082() qwindowsd.dll!0x00007FFD2BF7FF66() qwindowsd.dll!0x00007FFD2BF805E4() qwindowsd.dll!0x00007FFD2BF85AFA() qwindowsd.dll!0x00007FFD2C0107EE() qwindowsd.dll!0x00007FFD2C00F6BB() qwindowsd.dll!0x00007FFD2C00FBEA() qwindowsd.dll!0x00007FFD2C00F604() qwindowsd.dll!0x00007FFD2C00DBD9() qwindowsd.dll!0x00007FFD2BF7A185() C:\Users\qt\work\qt\qtbase\src\gui\kernel\qguiapplication.cpp (1379): Qt6Guid.dll!init_platform() + 0x2F bytes C:\Users\qt\work\qt\qtbase\src\gui\kernel\qguiapplication.cpp (1591): Qt6Guid.dll!QGuiApplicationPrivate::createPlatformIntegration() + 0x9A bytes C:\Users\qt\work\qt\qtbase\src\gui\kernel\qguiapplication.cpp (1613): Qt6Guid.dll!QGuiApplicationPrivate::createEventDispatcher() C:\Users\qt\work\qt\qtbase\src\widgets\kernel\qapplication.cpp (154): Qt6Widgetsd.dll!QApplicationPrivate::createEventDispatcher() C:\Users\qt\work\qt\qtbase\src\corelib\kernel\qcoreapplication.cpp (867): Qt6Cored.dll!QCoreApplicationPrivate::init() C:\Users\qt\work\qt\qtbase\src\gui\kernel\qguiapplication.cpp (1640): Qt6Guid.dll!QGuiApplicationPrivate::init() C:\Users\qt\work\qt\qtbase\src\widgets\kernel\qapplication.cpp (478): Qt6Widgetsd.dll!QApplicationPrivate::init() C:\Users\qt\work\qt\qtbase\src\widgets\kernel\qapplication.cpp (465): Qt6Widgetsd.dll!QApplication::QApplication() D:\Github\DSS\DeepSkyStacker\DeepSkyStacker.cpp (843): DeepSkyStacker.exe!main() + 0x1E bytes C:\Users\qt\work\qt\qtbase\src\entrypoint\qtentrypoint_win.cpp (45): DeepSkyStacker.exe!qtEntryPoint() + 0xE bytes C:\Users\qt\work\qt\qtbase\src\entrypoint\qtentrypoint_win.cpp (64): DeepSkyStacker.exe!WinMain() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (107): DeepSkyStacker.exe!invoke_main() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (288): DeepSkyStacker.exe!__scrt_common_main_seh() + 0x5 bytes D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (331): DeepSkyStacker.exe!__scrt_common_main() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp (17): DeepSkyStacker.exe!WinMainCRTStartup() KERNEL32.DLL!BaseThreadInitThunk() + 0x17 bytes ntdll.dll!RtlUserThreadStart() + 0x2C bytes Data: 88 66 0E 66 FE 7F 00 00 01 00 00 00 DD DD DD DD .f.f.... ........ 00 00 00 00 00 00 00 00 80 A5 93 02 00 00 00 00 ........ ........ 00 00 00 00 00 00 00 00 01 00 00 00 DD DD DD DD ........ ........ : : lots of lines omitted : Visual Leak Detector detected 626 memory leaks (74964 bytes). Largest number used: 2496521 bytes. Total allocations: 38816395 bytes. Visual Leak Detector is now exiting. The program '[2664] DeepSkyStacker.exe' has exited with code 0 (0x0).
This is a quite nasty regression.
David
-
Install the Qt debug symbols and sources to get a better backtrace, create a minimal, compileable example.
-
-
@Perdrix said in Memory leaks in 6.9.1 that weren't there in 6.9.0:
And still no mimimal, compilable example to reproduce the problem...
-
@Perdrix
But if you want the devs to actually look at it you need to supply some complete, minimal program which shows that. Devs expect to copy, paste, compile, run, see behaviour, investigate. If you say it is so easy to reproduce that should not be hard. Otherwise I would not rely on them looking into it. -
I thought it was trivial to reproduce - but my initial stab at a test case shows I was wrong - I am working on a test case that does show the problem.
-
P Perdrix has marked this topic as solved
-
The problem is - the initial report and the testcase do not match and 90% of the vld report don't even have a Qt dll anywhere in the backtrace so it's hard to see where Qt should be involved here.
As I wrote in my first post - install the Qt debug symbols so we can at least see where exactly in the Qt source the leak should be as it's not reproducible/is different with your test application