COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-20-2020, 01:02 AM   #1
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default Why IPlug2 leaks everywhere?

IPlug1 LICE zero leaks.


IPlug2 ∞ leaks:


SKIA LEAK A LOT (250), NANOVG LEAK SOMETIMES.

Last edited by Nikolaos; 02-20-2020 at 02:55 AM.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 06:38 AM   #2
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

* removed angry remarks *

if you think you found a bug, make an issue on github with clear steps to reproduce. There are bugs - it is in development after all. I just fixed an annoying leak on iOS today. There are some known issues related to memory on github.

thanks

oli
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)

Last edited by olilarkin; 02-20-2020 at 12:58 PM.
olilarkin is offline   Reply With Quote
Old 02-20-2020, 11:17 AM   #3
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
based on the tone of your forum posts I am not convinced you know what you are talking about. It is not helpful for the project to have people spread misinformation on forums, please stop.

if you think you found a bug, make an issue on github with clear steps to reproduce. There are bugs - it is in development after all. I just fixed an annoying leak on iOS today. There are some known issues related to memory on github.

thanks

oli

I am not having problems with memory management, pointers etc in my code.

The same code with NANOVG works acceptable.

And with SKIA it gives hundreds of leaks.

Skia was installed correctly etc.

I'm in Win 10 and VS2019.


Ps:

Right now I put a monthly tip in Patreon to avoid disrespecting me when I bring a question.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:10 PM   #4
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by Nikolaos View Post
I am not having problems with memory management, pointers etc in my code.

The same code with NANOVG works acceptable.

And with SKIA it gives hundreds of leaks.

Skia was installed correctly etc.

I'm in Win 10 and VS2019.


Ps:

Right now I put a monthly tip in Patreon to avoid disrespecting me when I bring a question.


PS2:


If for some reason my word is not enough, you want to repeat the error, simply using the SKIA library in YOUR "IPlugControls" project, at least 274 leaks (basically the same leaks to which I refer).

Detected via CRT and VDL (methods) although they were already visible to the naked eye by the behavior of the app in the resource monitor.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:12 PM   #5
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

what leaks?
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 12:24 PM   #6
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

by the way, we have a slack channel which is more active than this forum. If you are nice and you want to help us make this project better, you are welcome to come there and ask questions, you are more likely to get an answer. Just consider exactly how much work went into this project and you can understand why it makes me a bit sad to see forum posts like this.

By the way iPlug1 had tonnes of leaks. Many of which i fixed.
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 12:27 PM   #7
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
what leaks?

These are some of the 274:



WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1216 at 0x0000000000379FA0: 136 bytes ----------
Leak Hash: 0x0019349E, Count: 1, Total 136 bytes




---------- Block 25177 at 0x000000000C23A190: 40 bytes ----------
Leak Hash: 0x6584BB22, Count: 1, Total 40 bytes
Call Stack (TID 4856):
ntdll.dll!RtlAllocateHeap()
IPlugControls.exe!0x0000000140E00826()
IPlugControls.exe!0x0000000140E005AD()
IPlugControls.exe!0x0000000140E0431F()
IPlugControls.exe!0x0000000140E4482E()
IPlugControls.exe!0x0000000140D856E3()
IPlugControls.exe!0x00000001409D31C3()
IPlugControls.exe!0x00000001409C2A14()
IPlugControls.exe!0x00000001409C9643()
IPlugControls.exe!0x00000001409CE67C()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CE8DB()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CE8DB()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CB7FD()
IPlugControls.exe!0x00000001409D10C1()
IPlugControls.exe!0x000000014087642C()
IPlugControls.exe!0x0000000140876E28()
IPlugControls.exe!0x00000001407FEF6F()
IPlugControls.exe!0x0000000140900297()
IPlugControls.exe!0x00000001408FF438()
IPlugControls.exe!0x00000001407EC826()
IPlugControls.exe!0x00000001405F3097()
IPlugControls.exe!0x00000001405F5794()
IPlugControls.exe!0x00000001405FDAFF()
IPlugControls.exe!0x00000001408D9C27()
IPlugControls.exe!0x00000001407D4864()
IPlugControls.exe!0x0000000140787F6B()
IPlugControls.exe!0x0000000140787C6D()
IPlugControls.exe!0x000000014078BA73()
IPlugControls.exe!0x000000014078AEEF()
IPlugControls.exe!0x000000014078BD04()
IPlugControls.exe!0x00000001405B1C58()
IPlugControls.exe!0x00000001405A55D3()
IPlugControls.exe!0x0000000140CFD2C3()
IPlugControls.exe!0x0000000140C9A37E()
IPlugControls.exe!0x0000000140D0E9EB()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!GetWindowDC() + 0x75 bytes
USER32.dll!SetWindowTextW() + 0x277 bytes
USER32.dll!IsDialogMessageW() + 0x169 bytes
ntdll.dll!KiUserCallbackDispatcher() + 0x1F bytes
USER32.dll!BeginPaint() + 0x1A bytes
USER32.dll!BeginPaint() + 0x2C bytes
USER32.dll!IsDialogMessageW() + 0x102 bytes
USER32.dll!IsDialogMessage() + 0x7A bytes
IPlugControls.exe!0x0000000140D435D5()
IPlugControls.exe!0x0000000140D88052()
Data:
50 9C 23 0C 00 00 00 00 20 A1 23 0C 00 00 00 00 P.#..... ..#.....
06 04 03 41 01 00 00 00 09 00 00 00 00 00 00 00 ...A.... ........
0E 00 00 00 CD CD CD CD ........ ........


---------- Block 51693 at 0x000000000C96A710: 2048 bytes ----------
Leak Hash: 0x4D735D7E, Count: 1, Total 2048 bytes
Call Stack (TID 4856):
ntdll.dll!RtlAllocateHeap()
IPlugControls.exe!0x0000000140E00826()
IPlugControls.exe!0x0000000140E005AD()
IPlugControls.exe!0x0000000140E0431F()
IPlugControls.exe!0x0000000140E4482E()
IPlugControls.exe!0x0000000140D856E3()
IPlugControls.exe!0x0000000140D860F3()
IPlugControls.exe!0x000000014055710A()
IPlugControls.exe!0x00000001405EA0AD()
IPlugControls.exe!0x00000001405EA28E()
IPlugControls.exe!0x00000001407E78FF()
IPlugControls.exe!0x00000001405E760B()
IPlugControls.exe!0x00000001407CE7D4()
IPlugControls.exe!0x000000014085412B()
IPlugControls.exe!0x00000001408543C1()
IPlugControls.exe!0x00000001409217F7()
IPlugControls.exe!0x0000000140787783()
IPlugControls.exe!0x00000001407C5941()
IPlugControls.exe!0x000000014078B8BD()
IPlugControls.exe!0x000000014078AEEF()
IPlugControls.exe!0x000000014078BD04()
IPlugControls.exe!0x00000001405B1C58()
IPlugControls.exe!0x00000001405A55D3()
IPlugControls.exe!0x0000000140CFD2C3()
IPlugControls.exe!0x0000000140C9A37E()
IPlugControls.exe!0x0000000140D0E9EB()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!GetWindowDC() + 0x75 bytes
USER32.dll!SetWindowTextW() + 0x277 bytes
USER32.dll!IsDialogMessageW() + 0x169 bytes
ntdll.dll!KiUserCallbackDispatcher() + 0x1F bytes
USER32.dll!SetWindowPos() + 0xBA bytes
USER32.dll!UpdateWindow() + 0x2A bytes
IPlugControls.exe!0x0000000140D06266()
IPlugControls.exe!0x0000000140D0E0EE()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!TranslateMessage() + 0x1E2 bytes
Data:
60 55 8C 09 00 00 00 00 00 10 5E 13 50 00 00 00 `U...... ..^.P...
07 9D 9A 06 00 00 7A BD 12 00 48 D4 21 00 0D B0 ......z. ..H.!...
7B 01 00 1A CB 4B 00 31 D9 31 00 00 01 7B 92 04 {....K.1 .1...{..
62 AD 0C 00 00 00 31 C2 26 A5 62 00 00 00 00 0C b.....1. &.b.....
AA 69 BE 23 00 00 00 00 00 58 DE 9A 06 00 00 00 .i.#.... .X......
00 00 23 D6 48 00 00 00 00 00 00 48 C9 1A 00 00 ..#.H... ...H....
00 00 06 26 C0 78 01 00 00 00 00 43 FA 99 0C 00 ...&.x.. ...C....
00 00 00 00 13 84 EE FA B9 2B 00 00 0A 9F AA 26 ........ .+.....&
19 8B CB 1A 00 31 D9 31 00 00 21 D6 3F 00 06 12 .....1.1 ..!.?...
04 00 00 1B CF 3F 00 00 00 00 00 00 55 C9 1A 00 .....?.. ....U...
00 00 00 00 2B D7 55 00 00 00 00 00 19 C0 81 04 ....+.U. ........
00 00 00 00 16 B0 83 07 00 00 00 00 0C A1 A1 0C ........ ........
00 00 00 00 04 81 CC 2E 14 14 14 10 01 29 E0 FF ........ .....)..
FF FF FF FF A5 0A 00 01 47 CC FF D9 5E 04 00 00 ........ G...^...
3F E0 54 14 3E D7 55 00 00 88 92 04 00 01 8B 9A ?.T.>.U. ........
06 00 00 00 00 00 00 88 92 04 00 00 00 00 00 21 ........ .......!


Visual Leak Detector detected 274 memory leaks (811214 bytes).
Largest number used: 6113132 bytes.
Total allocations: 35999270 bytes.
Visual Leak Detector is now exiting.
The program '[0x4B14] IPlugControls.exe' has exited with code 0 (0x0).
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:33 PM   #8
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by Nikolaos View Post
These are some of the 274:



WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1216 at 0x0000000000379FA0: 136 bytes ----------
Leak Hash: 0x0019349E, Count: 1, Total 136 bytes




---------- Block 25177 at 0x000000000C23A190: 40 bytes ----------
Leak Hash: 0x6584BB22, Count: 1, Total 40 bytes
Call Stack (TID 4856):
ntdll.dll!RtlAllocateHeap()
IPlugControls.exe!0x0000000140E00826()
IPlugControls.exe!0x0000000140E005AD()
IPlugControls.exe!0x0000000140E0431F()
IPlugControls.exe!0x0000000140E4482E()
IPlugControls.exe!0x0000000140D856E3()
IPlugControls.exe!0x00000001409D31C3()
IPlugControls.exe!0x00000001409C2A14()
IPlugControls.exe!0x00000001409C9643()
IPlugControls.exe!0x00000001409CE67C()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CE8DB()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CE8DB()
IPlugControls.exe!0x00000001409CC165()
IPlugControls.exe!0x00000001409CB7FD()
IPlugControls.exe!0x00000001409D10C1()
IPlugControls.exe!0x000000014087642C()
IPlugControls.exe!0x0000000140876E28()
IPlugControls.exe!0x00000001407FEF6F()
IPlugControls.exe!0x0000000140900297()
IPlugControls.exe!0x00000001408FF438()
IPlugControls.exe!0x00000001407EC826()
IPlugControls.exe!0x00000001405F3097()
IPlugControls.exe!0x00000001405F5794()
IPlugControls.exe!0x00000001405FDAFF()
IPlugControls.exe!0x00000001408D9C27()
IPlugControls.exe!0x00000001407D4864()
IPlugControls.exe!0x0000000140787F6B()
IPlugControls.exe!0x0000000140787C6D()
IPlugControls.exe!0x000000014078BA73()
IPlugControls.exe!0x000000014078AEEF()
IPlugControls.exe!0x000000014078BD04()
IPlugControls.exe!0x00000001405B1C58()
IPlugControls.exe!0x00000001405A55D3()
IPlugControls.exe!0x0000000140CFD2C3()
IPlugControls.exe!0x0000000140C9A37E()
IPlugControls.exe!0x0000000140D0E9EB()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!GetWindowDC() + 0x75 bytes
USER32.dll!SetWindowTextW() + 0x277 bytes
USER32.dll!IsDialogMessageW() + 0x169 bytes
ntdll.dll!KiUserCallbackDispatcher() + 0x1F bytes
USER32.dll!BeginPaint() + 0x1A bytes
USER32.dll!BeginPaint() + 0x2C bytes
USER32.dll!IsDialogMessageW() + 0x102 bytes
USER32.dll!IsDialogMessage() + 0x7A bytes
IPlugControls.exe!0x0000000140D435D5()
IPlugControls.exe!0x0000000140D88052()
Data:
50 9C 23 0C 00 00 00 00 20 A1 23 0C 00 00 00 00 P.#..... ..#.....
06 04 03 41 01 00 00 00 09 00 00 00 00 00 00 00 ...A.... ........
0E 00 00 00 CD CD CD CD ........ ........


---------- Block 51693 at 0x000000000C96A710: 2048 bytes ----------
Leak Hash: 0x4D735D7E, Count: 1, Total 2048 bytes
Call Stack (TID 4856):
ntdll.dll!RtlAllocateHeap()
IPlugControls.exe!0x0000000140E00826()
IPlugControls.exe!0x0000000140E005AD()
IPlugControls.exe!0x0000000140E0431F()
IPlugControls.exe!0x0000000140E4482E()
IPlugControls.exe!0x0000000140D856E3()
IPlugControls.exe!0x0000000140D860F3()
IPlugControls.exe!0x000000014055710A()
IPlugControls.exe!0x00000001405EA0AD()
IPlugControls.exe!0x00000001405EA28E()
IPlugControls.exe!0x00000001407E78FF()
IPlugControls.exe!0x00000001405E760B()
IPlugControls.exe!0x00000001407CE7D4()
IPlugControls.exe!0x000000014085412B()
IPlugControls.exe!0x00000001408543C1()
IPlugControls.exe!0x00000001409217F7()
IPlugControls.exe!0x0000000140787783()
IPlugControls.exe!0x00000001407C5941()
IPlugControls.exe!0x000000014078B8BD()
IPlugControls.exe!0x000000014078AEEF()
IPlugControls.exe!0x000000014078BD04()
IPlugControls.exe!0x00000001405B1C58()
IPlugControls.exe!0x00000001405A55D3()
IPlugControls.exe!0x0000000140CFD2C3()
IPlugControls.exe!0x0000000140C9A37E()
IPlugControls.exe!0x0000000140D0E9EB()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!GetWindowDC() + 0x75 bytes
USER32.dll!SetWindowTextW() + 0x277 bytes
USER32.dll!IsDialogMessageW() + 0x169 bytes
ntdll.dll!KiUserCallbackDispatcher() + 0x1F bytes
USER32.dll!SetWindowPos() + 0xBA bytes
USER32.dll!UpdateWindow() + 0x2A bytes
IPlugControls.exe!0x0000000140D06266()
IPlugControls.exe!0x0000000140D0E0EE()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!TranslateMessage() + 0x1E2 bytes
Data:
60 55 8C 09 00 00 00 00 00 10 5E 13 50 00 00 00 `U...... ..^.P...
07 9D 9A 06 00 00 7A BD 12 00 48 D4 21 00 0D B0 ......z. ..H.!...
7B 01 00 1A CB 4B 00 31 D9 31 00 00 01 7B 92 04 {....K.1 .1...{..
62 AD 0C 00 00 00 31 C2 26 A5 62 00 00 00 00 0C b.....1. &.b.....
AA 69 BE 23 00 00 00 00 00 58 DE 9A 06 00 00 00 .i.#.... .X......
00 00 23 D6 48 00 00 00 00 00 00 48 C9 1A 00 00 ..#.H... ...H....
00 00 06 26 C0 78 01 00 00 00 00 43 FA 99 0C 00 ...&.x.. ...C....
00 00 00 00 13 84 EE FA B9 2B 00 00 0A 9F AA 26 ........ .+.....&
19 8B CB 1A 00 31 D9 31 00 00 21 D6 3F 00 06 12 .....1.1 ..!.?...
04 00 00 1B CF 3F 00 00 00 00 00 00 55 C9 1A 00 .....?.. ....U...
00 00 00 00 2B D7 55 00 00 00 00 00 19 C0 81 04 ....+.U. ........
00 00 00 00 16 B0 83 07 00 00 00 00 0C A1 A1 0C ........ ........
00 00 00 00 04 81 CC 2E 14 14 14 10 01 29 E0 FF ........ .....)..
FF FF FF FF A5 0A 00 01 47 CC FF D9 5E 04 00 00 ........ G...^...
3F E0 54 14 3E D7 55 00 00 88 92 04 00 01 8B 9A ?.T.>.U. ........
06 00 00 00 00 00 00 88 92 04 00 00 00 00 00 21 ........ .......!


Visual Leak Detector detected 274 memory leaks (811214 bytes).
Largest number used: 6113132 bytes.
Total allocations: 35999270 bytes.
Visual Leak Detector is now exiting.
The program '[0x4B14] IPlugControls.exe' has exited with code 0 (0x0).


I want the following to be understood, when someone comments, it is not personal, since it is not a criticism of your abilities as a programmer.

The frustrating component of programming, including bad sleep, visual fatigue, rand() stress makes things sound rough.

But if we have to adopt a nineteenth-century Victorian tone it becomes impossible.

Of course I appreciate your generosity in all this.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:34 PM   #9
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
by the way, we have a slack channel which is more active than this forum. If you are nice and you want to help us make this project better, you are welcome to come there and ask questions, you are more likely to get an answer. Just consider exactly how much work went into this project and you can understand why it makes me a bit sad to see forum posts like this.

By the way iPlug1 had tonnes of leaks. Many of which i fixed.

I want the following to be understood, when someone comments, it is not personal, since it is not a criticism of your abilities as a programmer.

The frustrating component of programming, including bad sleep, visual fatigue, rand() stress makes things sound rough.

But if we have to adopt a nineteenth-century Victorian tone it becomes impossible.

Of course I appreciate your generosity in all this.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:38 PM   #10
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Of course, if I may, this seems remarkable to me among all the other dumps:



---------- Block 7445 at 0x000000000999E800: 64 bytes ----------
Leak Hash: 0x8B0FFFA3, Count: 1, Total 64 bytes
Call Stack (TID 4856):
ntdll.dll!RtlAllocateHeap()
IPlugControls.exe!0x0000000140E00826()
IPlugControls.exe!0x0000000140E005AD()
IPlugControls.exe!0x0000000140E0431F()
IPlugControls.exe!0x0000000140E4482E()
IPlugControls.exe!0x0000000140D856E3()
IPlugControls.exe!0x0000000140ADAB76()
IPlugControls.exe!0x0000000140AB8B57()
IPlugControls.exe!0x0000000140AB9DDE()
IPlugControls.exe!0x000000014095EE44()
IPlugControls.exe!0x0000000140865137()
IPlugControls.exe!0x000000014085FED3()
IPlugControls.exe!0x00000001407EC229()
IPlugControls.exe!0x00000001407FEE66()
IPlugControls.exe!0x0000000140900297()
IPlugControls.exe!0x00000001408FF438()
IPlugControls.exe!0x00000001407EC826()
IPlugControls.exe!0x00000001405F3097()
IPlugControls.exe!0x00000001405F5794()
IPlugControls.exe!0x00000001405FDAFF()
IPlugControls.exe!0x00000001408D9C27()
IPlugControls.exe!0x00000001407D4864()
IPlugControls.exe!0x0000000140790368()
IPlugControls.exe!0x0000000140787F6B()
IPlugControls.exe!0x0000000140787C6D()
IPlugControls.exe!0x000000014078BA73()
IPlugControls.exe!0x000000014078AEEF()
IPlugControls.exe!0x000000014078BD04()
IPlugControls.exe!0x00000001405B1C58()
IPlugControls.exe!0x00000001405A55D3()
IPlugControls.exe!0x0000000140CFD2C3()
IPlugControls.exe!0x0000000140C9A37E()
IPlugControls.exe!0x0000000140D0E9EB()
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
OPENGL32.dll!glDebugEntry() + 0xF31E bytes
USER32.dll!TranslateMessageEx() + 0x29D bytes
USER32.dll!CallWindowProcW() + 0x9C bytes
USER32.dll!CallWindowProcW() + 0x18 bytes
COMCTL32.dll!Ordinal234() + 0x279 bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x7C bytes
COMCTL32.dll!DefSubclassProc() + 0x2A7 bytes
COMCTL32.dll!DefSubclassProc() + 0x181 bytes
USER32.dll!GetWindowDC() + 0x75 bytes
USER32.dll!SetWindowTextW() + 0x277 bytes
USER32.dll!IsDialogMessageW() + 0x169 bytes
ntdll.dll!KiUserCallbackDispatcher() + 0x1F bytes
USER32.dll!BeginPaint() + 0x1A bytes
USER32.dll!BeginPaint() + 0x2C bytes
USER32.dll!IsDialogMessageW() + 0x102 bytes
USER32.dll!IsDialogMessage() + 0x7A bytes
IPlugControls.exe!0x0000000140D435D5()
IPlugControls.exe!0x0000000140D88052()
IPlugControls.exe!0x0000000140D87F3E()
IPlugControls.exe!0x0000000140D87DFE()
IPlugControls.exe!0x0000000140D880E9()
kernel32.dll!BaseThreadInitThunk() + 0xD bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes
Data:
80 E9 99 09 00 00 00 00 80 E7 99 09 00 00 00 00 ........ ........
50 42 99 09 00 00 00 00 53 6B 49 52 65 63 74 00 PB...... SkIRect.
34 00 66 00 00 70 00 00 07 00 00 00 00 00 00 00 4.f..p.. ........
0F 00 00 00 00 00 00 00 2A 00 00 00 CD CD CD CD ........ *.......
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:40 PM   #11
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

by victorian do you mean "being polite?"
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 12:47 PM   #12
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
by victorian do you mean "being polite?"

I mean not reaching situations like to be forced to use my Bartitsu.
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 12:56 PM   #13
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

Let it be known that I am guilty of sometimes "taking things too personally".

I can't see any reference to iPlug classes in those VLD traces. I see an SkIRECT. Does VLD work in VS2019 for you?
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 01:21 PM   #14
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
Let it be known that I am guilty of sometimes "taking things too personally".

I can't see any reference to iPlug classes in those VLD traces. I see an SkIRECT. Does VLD work in VS2019 for you?
Yes, it works (in part I guess), although I mainly use CRT Library and the diagnostic tools of VS2019.

But VLD, allowed me for that matter, to make a more readable dump.

Anyway I suspected it because of the behavior of the app.

Among other things it is impossible for me to use NANOVG because it has problems with SVGs (especially with the level of opacity, in the filling)


Here someone tells me that SKIA is characterized by leaks, (same as CHROME)
Nikolaos is offline   Reply With Quote
Old 02-20-2020, 02:15 PM   #15
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

Using the VS2019 performance profiler I don't see any large leaks - from what I can see from your VLD output it looks like SKIA possibly leaks 800 kB, but there may be false positives. There is a known memory issue when resizing the GUI with skia and nanovg. Other than that I don't think what you are seeing is very significant. Feel free to debug it more though - it would be great to get rid of any leaks, even tiny ones. I am sure google would like to know if you found that SKIA is leaking a lot.

BTW, there is a branch where i am trying to use a library called RESVG which is a very nice rust svg library. I am waiting for the next version of the library in order to integrate high quality svg support to all igraphics backends.
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)

Last edited by olilarkin; 02-20-2020 at 02:30 PM.
olilarkin is offline   Reply With Quote
Old 02-20-2020, 02:52 PM   #16
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

using CRT with nanovg... looks like some fonts are leaking. Can't seem to use it with easily SKIA due to a naming clash with a skia header
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 04:43 PM   #17
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

So... i learnt how to use CRT and i can see a bunch of leaks in iPlug2 code coming from various classes that use WDL_Heapbuf, such as WDL_String and WDL_Typedbuf. Going to try and isolate the issue and submit a patch
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-20-2020, 05:48 PM   #18
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
So... i learnt how to use CRT and i can see a bunch of leaks in iPlug2 code coming from various classes that use WDL_Heapbuf, such as WDL_String and WDL_Typedbuf. Going to try and isolate the issue and submit a patch
Thank you very much Oli, I understand that I have to be careful with the title of the threads (English is not my first language)

After a few days of doubts and complaints about having to leave the well-known IPlug1 I come excited about IPlug2 which I already consider a great step forward.

Nikolaos is offline   Reply With Quote
Old 02-23-2020, 03:27 PM   #19
AHarker
Human being with feelings
 
Join Date: Jul 2010
Posts: 19
Default

If there are memory leaks in iPlug2 (and it sounds like you have seen some) we would hope to fix them. I have seen leaks with arcs on Skia GL on Mac (there is an issue up about that), but I'm unaware of the situation on windows. If you can help us narrow down where you are seeing leaks that would be really helpfully and bug reports of the GitHub are the *only* way to guarantee that we will be able to track the problem.

I'm wary that the conversation about hasn't all been positive so please let me explain why that is. If we get info about a possible issue that we cannot quickly and easily reproduce we do not always make an issue (as sometimes there are misunderstandings/user errors and that would bloat the issue list) so it relies on one of us remembering to come back to it and sometimes we will forget. If the issue is made on GitHub it is tracked and we will not close it without investigating it further.

In terms of bug reports the more specific you can be the better (for instance does it happen with SKIA GL only or also SKIA CPU?). We do appreciate any time that people put into making reports and trying to point out issues.
AHarker is offline   Reply With Quote
Old 02-24-2020, 01:07 AM   #20
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by AHarker View Post
If there are memory leaks in iPlug2 (and it sounds like you have seen some) we would hope to fix them. I have seen leaks with arcs on Skia GL on Mac (there is an issue up about that), but I'm unaware of the situation on windows. If you can help us narrow down where you are seeing leaks that would be really helpfully and bug reports of the GitHub are the *only* way to guarantee that we will be able to track the problem.

I'm wary that the conversation about hasn't all been positive so please let me explain why that is. If we get info about a possible issue that we cannot quickly and easily reproduce we do not always make an issue (as sometimes there are misunderstandings/user errors and that would bloat the issue list) so it relies on one of us remembering to come back to it and sometimes we will forget. If the issue is made on GitHub it is tracked and we will not close it without investigating it further.

In terms of bug reports the more specific you can be the better (for instance does it happen with SKIA GL only or also SKIA CPU?). We do appreciate any time that people put into making reports and trying to point out issues.

Thanks!

since finally the leaks that I reported in NANOVG was a typical problem of pointers in a class of my old code that used IPLUG 1.

So the only thing that continues with big leaks is Skia, (fonts, controls, resizing etc)

GL2 of twice as many leaks as CPU.




ps: I will try to be more active in github.
Nikolaos is offline   Reply With Quote
Old 02-25-2020, 04:24 PM   #21
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: UK
Posts: 1,216
Default

been doing some investigation here https://github.com/iPlug2/iPlug2/issues/463

I've learnt its very important to get _CrtDumpMemoryLeaks(); in the right place!

There is a bunch of heap-allocated stuff that gets stored statically in IGraphics using a class we have called StaticStorage<>. It's not till all those have been destructed that _CrtDumpMemoryLeaks() can be called.

Bad news is with skia it still prints quite a lot of leaks, but i am wondering if there are similar things within skia that might not be getting dealloc'd by the time of calling _CrtDumpMemoryLeaks()
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 02-26-2020, 12:54 PM   #22
Nikolaos
Human being with feelings
 
Join Date: Dec 2019
Posts: 29
Default

Quote:
Originally Posted by olilarkin View Post
been doing some investigation here https://github.com/iPlug2/iPlug2/issues/463

I've learnt its very important to get _CrtDumpMemoryLeaks(); in the right place!

There is a bunch of heap-allocated stuff that gets stored statically in IGraphics using a class we have called StaticStorage<>. It's not till all those have been destructed that _CrtDumpMemoryLeaks() can be called.

Bad news is with skia it still prints quite a lot of leaks, but i am wondering if there are similar things within skia that might not be getting dealloc'd by the time of calling _CrtDumpMemoryLeaks()
Excellent and thanks Oli!, I found some minor inconveniences caused by not taking the time to analyze in depth the infrastructure changes, mainly between IPlug 1 to 2.

Meanwhile Skia is still leaking, but most are related to the controls in which I use fonts (tabs style, or that use labels etc)
some isolated leak seems to have to do with rotation etc.

But I'm not good at tracking the exact line where the leak happens.

It is unfortunate because Skia seems the best option, between speed and quality.
Nikolaos is offline   Reply With Quote
Old 03-03-2020, 09:52 AM   #23
AHarker
Human being with feelings
 
Join Date: Jul 2010
Posts: 19
Default

My feeling is that what would be useful to know about are things that cause the RAM size to grow over time and not shrink back. On Mac you can easily monitor RAM usage, which might be better than the more technical leak tracking for giving us stuff to dig deeper on.
AHarker is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.