So, my first AIR app is complete and I am in the process of profiling it
before I submit it to the various App Stores. On Android, I ran it for over
an hour with no crashes or hangups, although looking at Scout, its memory
seems to run awfully high IMO. When it reaches around 550MB, AIR kicks it
back down to 200MB with garbage collection. It usually hangs out around
200-350MB on Android.
Apple is a different story. It just crashes randomly, after 10 minutes,
after 20 minutes. The crashes happen around 370MB, but I am not convinced
that it is a memory issue. Looking at the various crash reports generated
by the iPad, I have attached five different crashes that I logged. In my
estimation, Apple is kicking the app out because it is not responding to
something in the appropriate amount of time, but I have not a clue what it
is, how to debug it, or where to look to address it. Please let me know if
you have any experience with this at all as I really feel lost at this
> Looking at the various crash reports generated
> by the iPad, I have attached five different crashes that I logged. In my
> estimation, Apple is kicking the app out because it is not responding to
> something in the appropriate amount of time, but I have not a clue what it
> is, how to debug it, or where to look to address it.
Looks that this is the case - see .
Sorry it’s a little hard to suggest how to track this downs other than to play with the application and see if you can reproduce it. I you can reproduce perhaps remove the frequency of calls to the backend and see if that helps? Or perhaps it could be related to calls that return a large amount of information and take a long time to parse the result? Perhaps your server is overloaded? Do you log any information on long requests server side? From a quick look it looks like 10 seconds is the magic value. Also looks like the program is trying to do too much when it is running in the background, try to reduce what it does when it is in this state. It seem 10 seconds is the magic time out from those error messages.
Thanks for the reply Justin. I don't think that the problem is calls to my
server, or any overloading of my server, first because I am the only one
using it, two because I purposely limit the amount of data that I request,
and three because I am using AMF so it is fast. There are only two things
that I feel it could possibly be if it is timing out or something.
1) This is a real estate app, and it uses a webview to display a google map
in it. I use markers in the map. I wouldn't have thought that it was the
map because it is not locked up or unresponsive when the app crashes, and I
thought that all the calls were asyncronous.
2) When a user clicks on a property, up to 30 images are downloaded and
cached for display. I do not supply the images, they come from the local
MLS. Perhaps they are not downloading in a timely fashion or something. I am
not sure what my options are here. I HAVE to have the images. Perhaps i
could fashion some sort of timeout on image loading, and if it fails, recall
the load until the image actually finishes???
So the map and the image loader is where I am going to start, because I
really doubt that my AMF backend service calls are the bottleneck. Those
are my thoughts.
So I got a little advice on another board that GPU renderMode, while fast,
can often run out of memory fast when working with a large number of big
photos and a lot of screen changes. I am running my app in Direct
renderMode and so far, have not experienced any crashes. But there is a
noticeable performance hit.
I would absolutely love to keep my app running in GPU renderMode. I don't
think my app is failing due to a memory leak or faulty coding yet. I think
that the GPU is running out of processing memory due to all of the images my
app processes. So here is a follow-up question. How effective is forcing
garbage collection, and does it effect the memory in the GPU as well???
For anybody who may ever run into this problem, I solved it by setting the
rendermode to "direct". I had it set on "gpu", which improved the
performance of my application tremendously, especially when scrolling lists
that contained images. It made it very smooth and I wish that I could
continue to keep the rendermode set to "gpu". Sadly, that is what was
causing my app to lock up or crash. As soon as I changed this back to
"direct", Adobe's recommended setting for mobile, I ran the app for over an
hour with not a single hangup or crash.