01-23-2014 10:46 AM
I have an issue with my app in which it spikes CPU and it stays high until I restart the app. the problem is somewhat intermittent and not easy to reproduce. it doesn't seem to be tied to any particular event that i can zero in on. I've been able to get profiling to work (after much frustration!) and nothing jumps out. there's no functions or methods being called excessively. no memory leaks that i can see.
I'm just really having a hard time figuring out how to troubleshoot this at this point. I'd even consider $$ for someone to help me.
is there any vehicle for getting some personal help with this? I'm pretty competent, but also fairly new to C++ and debugging, and since this problem is hard to reproduce, that makes it even harder.
does anyone have any suggestions on what do to?
I can run the app in Profile mode (but i've found that the prof.ptrace file isn't all that useful). i can keep my phone connected and run in debug, i'm just not sure what else to look for. the app log doesn't show anything useful, it all seems to run normally. I just can't find what it's doing that is using so much CPU.
I'm getting desperate and I don't know what to try next.
01-23-2014 10:57 AM
If you have managed to capture a profile at the time the CPU spikes I'm not sure why you wouldn't be able to see this in the profiling information.
The other explanation, and one only someone who is familiar with how the multitasking and resource management works in QNX would really be able to answer, is that your app is asking for a resource that either takes a long time to release or itself takes a lot of CPU cycles.
Does anything like that strike a chord with your app?
01-23-2014 11:27 AM
As another suggestion I'm not sure if you are familar with the technique called black box testing but removing your class, custom controls, etc. and placing them one by one in their own seperate app is a good way to find out where the fault lies.
I use this myself to stress test my custom controls but it's equally as good hunting down where the CPU cycles are being eaten.
01-23-2014 01:15 PM
01-23-2014 01:28 PM
01-23-2014 02:56 PM
01-23-2014 06:11 PM
01-23-2014 06:18 PM - edited 01-23-2014 06:19 PM
You should have something deleting on closure of the thread similar to...
connectResult = connect(mWorker, SIGNAL(finished()), mThread, SLOT(quit())); connectResult = connect(mThread, SIGNAL(finished()), mThread, SLOT(deleteLater()));
However if you have additional signals set up you should disconnect them within these slots with an extended clean up function.