ArduPilot / apm_planner

APM Planner Ground Control Station (Qt)
https://ardupilot.org
Other
509 stars 464 forks source link

Memory Leak Issue #978

Open jmodares opened 8 years ago

jmodares commented 8 years ago

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

billbonney commented 8 years ago

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.

jmodares commented 8 years ago

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.

billbonney commented 8 years ago

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.

dcarpy commented 8 years ago

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.

billbonney commented 8 years ago

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

billbonney commented 8 years ago

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 commented 8 years ago

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!