lagadic / visp

Open Source Visual Servoing Platform
https://visp.inria.fr/
GNU General Public License v2.0
724 stars 287 forks source link

AprilTag Memory Leak ViSP 3.4.0 #986

Closed erikstauber closed 2 years ago

erikstauber commented 2 years ago

I've seen a few older bugs related to memory leaks with the AprilTag detector; it still is leaking on my system. (Win 10 x64)

I'm running Visp3.4.0, and the method bool vpDetectorAprilTag::detect leaks about 20MB/min when detecting 5 tags at 60hz.

s-trinh commented 2 years ago

Could you add a minimal code to reproduce the issue?

erikstauber commented 2 years ago

Yes, I'll prepare that..

erikstauber commented 2 years ago

<updated Feb 3rd 6am to reflect latest test data>

I've done a more comprehensive test using the tutorial code unmodified, and memory continues to get gobbled up by the program.

---------------------------------- -----------memory usage at test time from Task Manager in MB-------- Test- -#Thrds- -Detect Time(ms)- -0min- -10min- -20min- -30min- -60min- -120min- -240min- -900min-
1--- --1------ --12-------------- -67---- -84----- -101--- -113---- -108--- ---------- ---------- ---------
2--- --4------ --6--------------- -72---- -88----- -104--- -114---- -147--- -151----- -282----- -723----

Every now and then, memory usage temporarily goes down, but ultimately it continues to rise. This clearly looks like a bug.

fspindle commented 2 years ago

@erikstauber Can you check again if this issue is now fixed on your side using the master branch