I’ve been having this issue with APM Planner 2 2.0.14 and 2.0.15RC3. It is intermittent, I can’t seem to figure out how to re-create it, but it happens about 50% of the time.
On application start, my computer freezes up completely (Thinkpad, 2.8Ghz, 4GiB ram, 14.04 Ubuntu 64 bit). Examining the System Monitor, I notice that APM Planner 2 is using 3.7GB of memory on start up! No wonder nothing else works…I let it proceed through start up (takes about 3-5 minutes), and it does finally make it through. But once the interface comes up, it is still consuming 1.6GiB of memory, which doesn’t seem right. I’ve attached a screenshot for proof. Seems like there is a giant memory leak somewhere in the start up. I also installed APM Planner on my more powerful machine and never have had issues (same operating system).
A bit flummoxed! Would be happy to provide logs etc… for debugging.
Your screen shot did not attach. Can you please pastebin the output from the command line “top” utility when it happens? This is much better than the system monitor utility at seeing actual memory usage.
Also, can you upload the logs (/home/username/apmplanner2/log*) from both when it happens, and when it does not? Thanks
wsilva: AP2 is only using 83864 (which is 83 megs) of memory. VIRT is a bit of a red herring, since it’s the amount of memory the application has available without having to re-map it to itself. Qt is fairly virtual heavy, which increases the speed of it without sacrificing actual system memory. AP2 is consuming very little memory, and very little CPU in that output.
That being said, I can see in the log file a couple of spots where it’s ‘pausing’ for 30+ seconds, that it should not be. Just to verify, you do have video drivers installed and working, correct? I’ll dig into it and see what may be taking so long, but the fact that the views with heavy opengl rendering seem to be taking the longest points to possibly not having hardware accelerated graphics?
I captured TOP output over a time duration. If you scroll down to the next TOP header you will see APM Planner pull more memory. If you continue to scroll down, you will see it pull even more. I posted 5 sequential TOP logs showing how APM Planner uses more and more memory during startup. I imagine the pause is just my machine choking due to lack of memory available that APM Planner is trying to pull.
Looking at the RES column, the first TOP log shows 42124, the next shows 997160, then 1.422g, then 2.605g, and finally 2.717g.
I should have mentioned this when I posted the logs. Sorry about that.
wsilva: Indeed I seem to have missed that, quite an issue!. Can you pastebin your configuration file (~/.config/diydrones/APM Planner.ini) and then delete and retry (After saving it elsewhere of course)
APM Planner seems to boot up now! Looks like that was the cause…corruption perhaps? Although I’m going to get to work with AP2, I’ll keep checking this topic in case you need anything else to debug what went wrong.
Excellent! That config file causes my machine to use 2gb of ram when starting, vs the normal 100mb. Thanks for posting that, I’ll see if I can track down what is causing it.