Memory leak or some other issues in my iPad application? - memory-leaks

I am facing problems with my iPad application some times it gets hang-up my application and still I am not able to figure out the issues why it is happening again and again with my application. I have tested application through instrument. Please help me out how can I figure out what is the problem with my application or how to prevent memory related issues.

There are many tools to help find memory leaks in Objective C programs, some integrated nicely on the OS X platform. Look for "instruments", "clang static analyzer", or "Leaks".

Related

Understanding DebugDiag Tool

I have been trying to understand what is the cause of high memory usage from processes in the windows server I have. I installed that tool DebugDiag 1.2 to try to find the problem.
Here is what runs in my server:
I have the IIS server which has a decent number of pool applications (68 pool applications). For each pool application there are at least 4 applications.
Recently, I have faced problems related to high memory usage, causing the server to work at 97% of memory usage or higher.
It was working fine when I took this printscreen below. However, the memory usage will easily get higher.
Task Manager:
With that being said, I have been trying to understand how to use the tool "DebugDiag1.2" from microsoft to find something (part of the source code, an sql procedure) that might help me locate what is causing the problem.
I read that we can't limit the memory for each IIS pool application, so I guess the solution would be trying to optmize the application. But first I need to know where to start.
I hope someone can help me out.

How can I debug a memory leak for a loopback application on Heroku?

We have a quite nasty memory leak going on in a loopback (node.js) app, but it does not seem to happen locally, only on Heroku.
It steadily increases memory usage without any requests, and I fired up 10 000 requests locally without seeing a similar pattern.
I currently have no good ideas for how to debug this further.
It turns out disabling New Relic fixed the issue. We had log level set to debug to figure out another issue, and suddenly all hell broke loose. They do indeed have a notice on their documentation about this.
I believe there is a blog post from Strongloop dealing with memory leak profiling here. It goes over installing heap dump and how to use Chrome dev tools to collect heap snapshots on the client side using the JavaScript console built into the browser. Analysis of the heap can be done within this same console as well.

System.OutOfMemoryException error

We are working on a rich client application in which many threads are running as well third party controls are used, after running application for 1 hour it starts giving error of 'System.OutOfMemoryException' unless and until we restart the application, i have search many sites for help but no particular and specified reason is giving.
Thanks.
It sounds pretty self-explanatory, you're system doesn't have enough memory. If you're still running the application as 32-bit then moving to 64-bit might solve the problem. I had exactly that problem on a server-2008-r2 recently, and moving to 64 bit did solve my problem. But if you're already 64 bit then perhaps the server doesn't have enough physical memory. In which case, you need to add more memory, or work out how to make your application less memory hungry. There could be objects that could be discarded that it's keeping references to, etc, and if that's the case you should try profiling to try and identify what's hogging the most memory. Beyond that, does the application use any unmanaged DLLs, e.g. COM objects written in C++ or similar. Maybe there's a memory leak outside of the managed framework?
I recommend using a profiler to identify and find where does the high memory consumption come from.

How to track memory leaks using codeduitests?

I have coded ui tests for standalone application. I think that we have memory leaks.
Does anybody have any ideas how to catch this using coded ui?
I know that we don't have any build-in feature to do this but maybe somebody faced the same problem before...
Doubtful that you can effectively find everything without hand-coding. Very simplified scenario - open and close one form for thousand times(suppose we talk about winforms) and hoping to get outofmemory, already requires cycle to call some automated script thousand times. Not to speak of more sophisticated scenarios - forcing garbage collection after each closing.
Coded ui tests is not the right tool for finding memory leaks.
You need to run profiling tools to identify memory leaks. You can use the visual studio profiler or other tools like ANTs Or .Net memory profiler (http://memprofiler.com/)

MonoTouch Running differently on IOS Emulator than on IPad

I'm having issues around my app (basically a modified Mobile World Conference) app when I run it on the IOS Emulator in windows, verses running it directly on the IPad itself. I understand that there is a different process or involved so I don't expect it to be exactly the same.
In specific, I'm getting errors around initializing sql databases (SqlLite) with errors being
"Object Not Defined"
When I try and single step debug to the device, I get errors that feel like somehow the stack has been corrupted and I can not even debug into methods.
My question is, what are the types of differences I can look for and how to debug them? There must be some pattern of things that cause issues, I just have no idea what that is or how to figure it out. I'm use to my c# code just working on x86.
What causes simulator to behave differently? Simulator is not constrained in memory usage like a real device so you're likely to hit memory warnings on the device (and crash if you don't handle them properly). The code itself, however, runs faster so race conditions between threads are more likely, so watch out for that. Don't talk to database from different threads, or at least use proper locking. And of course there are AOT limitations which occur only on the device. Your LINQ problem sounds like a AOT problem to me.

Resources