apm_planner icon indicating copy to clipboard operation
apm_planner copied to clipboard

Memory Leak Issue

Open jmodares opened this issue 9 years ago • 7 comments

The APM Planner uses roughly around 100 MiB of memory, and when it connects to a SITL, it starts to use more and more memory over the time,

Qt:

  1. 5.5.1

APM Planner: v2.0.23-rc1

OS:

  1. Linux Mint 17.3
  2. Ubuntu 14.04

jmodares avatar Aug 23 '16 16:08 jmodares

How much more and over what time frame? 100MB is not really a lot of memory of machine with memory usually being 2 or 4 GB minimum.

billbonney avatar Aug 23 '16 17:08 billbonney

The initial memory is not that important (event if it starts with 1 GiB), but the increase rate is important, which is about 1 MiB per minute. It means that you can not run the APM Planner for a whole day.

jmodares avatar Aug 23 '16 21:08 jmodares

It means that you can not run the APM Planner for a whole day.

Interesting. I've had APM Planner 2.0-rc4 running for 9hrs 40 mins on OSX. Real memory is about 700MB. I'm not saying that its not leaking memory. I'm just trying assess how urgent a fix is. It's not a showstopper.

You might want to try rc-4 built with Qt5.6.1 Qt since this may fix the problem. I'd reccomend building yourself on linux. You can download the Qt dev environment from http://download.qt.io which is the easiest
Thanks for reporting.

billbonney avatar Aug 24 '16 02:08 billbonney

Interesting. On Linux it's about 5.6MB per minute. On Windoze about 5MB per minute. I built on Windows using Qt 5.6.1--didn't help, still leaks. It doesn't leak when not connected, but I guess that makes sense. Well, my valgrind skills are a little rusty...but here we go.

dcarpy avatar Aug 25 '16 01:08 dcarpy

I'm sure it the auto graphing feature just make it switch off/on able

billbonney avatar Aug 25 '16 01:08 billbonney

Here's AP2 running for 1d7hr on OSX. It's only using 0.5G real memory, the rest has been cached to disk and compressed (it's claiming 2.89G compressed, 3.5G total) activitymonitor

ap2memory ap2stats

billbonney avatar Aug 25 '16 13:08 billbonney

It's still running, even with the memory leak... And it's connected to a simulator flying the whole time. For what it's worth!

billbonney avatar Aug 26 '16 03:08 billbonney