Skip to main content
Inspiring
January 16, 2018
Question

AIR Crash on iPad

  • January 16, 2018
  • 2 replies
  • 2435 views

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

level.

Thanks!

Log 1:

Incident Identifier: 473BFE42-EE9B-446E-88C2-FF07573FD341

CrashReporter Key:   4b6e6a5c7a0dd42aa5f46933ea8e9e76f089bbac

Hardware Model:      iPad3,3

Process:             RealDeals [5042]

Path:              

/var/containers/Bundle/Application/CCF0C452-56B6-4562-8B87-559184AC4B56/RealDeals.app/RealDeals

Identifier:          com.RealDeals.tablet

Version:             1.0.0 (1.0.0)

Code Type:           ARM (Native)

Parent Process:      launchd [1]

Date/Time:           2017-10-10 00:11:14.14 -0400

Launch Time:         2017-10-10 00:10:31.31 -0400

OS Version:          iOS 9.3.5 (13G36)

Report Version:      105

Exception Type:  00000020

Exception Codes: 0x000000008badf00d

Exception Note:  SIMULATED (this is NOT a crash)

Highlighted by Thread:  0

Application Specific Information:

com.RealDeals.tablet failed to exit after 5.00s

Elapsed total CPU time (seconds): 2.250 (user 2.250, system 0.000), 23% CPU

Elapsed application CPU time (seconds): 0.339, 3% CPU

Filtered syslog:

None found

Log 2:

Incident Identifier: 2C20580A-15A3-4B1B-B84C-8F3E9152A5FA

CrashReporter Key:   4b6e6a5c7a0dd42aa5f46933ea8e9e76f089bbac

Hardware Model:      iPad3,3

Process:             RealDeals [4028]

Path:              

/var/containers/Bundle/Application/572A85B9-4C40-42B7-8E72-44FA0A4955DB/RealDeals.app/RealDeals

Identifier:          com.RealDeals.tablet

Version:             1.0.0 (1.0.0)

Code Type:           ARM (Native)

Parent Process:      launchd [1]

Date/Time:           2017-10-05 19:40:50.50 -0400

Launch Time:         2017-10-05 19:35:13.13 -0400

OS Version:          iOS 9.3.5 (13G36)

Report Version:      105

Exception Type:  00000020

Exception Codes: 0x000000008badf00d

Exception Note:  SIMULATED (this is NOT a crash)

Highlighted by Thread:  0

Application Specific Information:

<BKNewProcess: 0x15531de0; com.RealDeals.tablet; pid: 4028; hostpid: -1> has

active assertions beyond permitted time:

{(

    <BKProcessAssertion: 0x15634080> id:

47-7C43F87B-C8D2-4041-AE31-1191FF9F89E3 name: Deliver Message process:

<BKNewProcess: 0x15531de0; com.RealDeals.tablet; pid: 4028; hostpid: -1>

permittedBackgroundDuration: 10.000000 reason: suspend owner pid:47

preventSuspend  preventThrottleDownCPU  preventThrottleDownUI

preventSuspendOnSleep ,

    <BKProcessAssertion: 0x15523d10> id:

47-3565E3B3-74C1-48F9-80B0-C942970BFBEB name: Suspending process:

<BKNewProcess: 0x15531de0; com.RealDeals.tablet; pid: 4028; hostpid: -1>

permittedBackgroundDuration: 10.000000 reason: suspend owner pid:47

preventSuspend  preventThrottleDownCPU  preventThrottleDownUI

preventSuspendOnSleep

)}

Elapsed total CPU time (seconds): 20.110 (user 20.110, system 0.000), 6% CPU

Elapsed application CPU time (seconds): 11.832, 3% CPU

Filtered syslog:

None found

Log 3:

Incident Identifier: A88DE2B8-9241-4C28-AD52-AB02905EB348

CrashReporter Key:   4b6e6a5c7a0dd42aa5f46933ea8e9e76f089bbac

Hardware Model:      iPad3,3

Process:             RealDeals [648]

Path:              

/var/containers/Bundle/Application/29E5AFCC-E342-4FDC-9C66-AD2A64E31BFB/RealDeals.app/RealDeals

Identifier:          com.RealDeals.tablet

Version:             1.0.0 (1.0.0)

Code Type:           ARM (Native)

Parent Process:      launchd [1]

Date/Time:           2017-09-05 21:31:00.00 -0400

Launch Time:         2017-09-05 21:26:43.43 -0400

OS Version:          iOS 9.3.5 (13G36)

Report Version:      105

Exception Type:  00000020

Exception Codes: 0x000000008badf00d

Exception Note:  SIMULATED (this is NOT a crash)

Highlighted by Thread:  0

Application Specific Information:

com.RealDeals.tablet failed to scene-update after 10.00s

Elapsed total CPU time (seconds): 2.900 (user 2.900, system 0.000), 14% CPU

Elapsed application CPU time (seconds): 0.664, 3% CPU

Filtered syslog:

None found

Log 4:

Incident Identifier: 05320FA3-4935-4524-9848-957123C5AB11

CrashReporter Key:   4b6e6a5c7a0dd42aa5f46933ea8e9e76f089bbac

Hardware Model:      iPad3,3

Process:             RealDeals [550]

Path:              

/var/containers/Bundle/Application/BC8FACEE-BC28-4680-A614-781C66BCD98C/RealDeals.app/RealDeals

Identifier:          com.RealDeals.tablet

Version:             1.0.0 (1.0.0)

Code Type:           ARM (Native)

Parent Process:      launchd [1]

Date/Time:           2017-09-05 14:42:56.56 -0400

Launch Time:         2017-09-05 14:41:41.41 -0400

OS Version:          iOS 9.3.5 (13G36)

Report Version:      105

Exception Type:  00000020

Exception Codes: 0x000000008badf00d

Exception Note:  SIMULATED (this is NOT a crash)

Highlighted by Thread:  0

Application Specific Information:

com.RealDeals.tablet failed to exit after 5.00s

Elapsed total CPU time (seconds): 2.000 (user 2.000, system 0.000), 20% CPU

Elapsed application CPU time (seconds): 0.359, 4% CPU

Filtered syslog:

None found

Log 5:

Incident Identifier: 99F1A75A-C0F5-4B8C-ABF2-0FB5A82DCFCB

CrashReporter Key:   4b6e6a5c7a0dd42aa5f46933ea8e9e76f089bbac

Hardware Model:      iPad3,3

Process:             RealDeals [511]

Path:              

/var/containers/Bundle/Application/57E26CED-D184-4F41-B056-7B7E39E24011/RealDeals.app/RealDeals

Identifier:          com.RealDeals.tablet

Version:             1.0.0 (1.0.0)

Code Type:           ARM (Native)

Parent Process:      launchd [1]

Date/Time:           2017-09-05 13:29:56.56 -0400

Launch Time:         2017-09-05 13:28:25.25 -0400

OS Version:          iOS 9.3.5 (13G36)

Report Version:      105

Exception Type:  00000020

Exception Codes: 0x000000008badf00d

Exception Note:  SIMULATED (this is NOT a crash)

Highlighted by Thread:  0

Application Specific Information:

com.RealDeals.tablet failed to exit after 5.00s

Elapsed total CPU time (seconds): 2.160 (user 2.160, system 0.000), 22% CPU

Elapsed application CPU time (seconds): 0.358, 4% CPU

Filtered syslog:

None found

This topic has been closed for replies.

2 replies

Inspiring
January 16, 2018

The list of what can cause crashes on Ios is long, no it's not always memory or CPU related but those need to be looked at first.

If developing from a windows computer then file names is another source of crashes.

Incorrect key in Object or Dictionary.

Removing events that doesn't exist.

And more. And yes Android will likely be fine with all this, moreover an ad-hoc Ios might even be fine with it.

How to track it down?

Remove, assess, add back. If you remove a view and get no crash anymore, the problem is related to that view, publish with that view only > still crash investigate deeper, remove components, events, ect ... track down the problem from views to components, methods, ect ... From top to bottom.

Memory or CPU related? make your app use more memory and more CPU, create twice as many views > crash sooner > you just got a clue. doesn't crash sooner > memory and CPU might be fine.

It's an investigation, it takes time, be organized, logical and you will find the source(s) of the crash.

Colin Holgate
Inspiring
January 16, 2018

There are various ways to make an app crash. Here are two examples:

1. Having too many unique graphics and setting render mode to GPU. GPU does give amazing performance, but if you're using many different images, like you might with an animation, the GPU can fill up quickly. Using Direct for render mode solves that, but might lower the performance in some cases.

2. Not forgetting things. If you did this:

var mc:MovieClip = new MassiveLibraryMC() as MovieClip;

addChild(mc);

mc.addEventListener(Event.ENTER_FRAME,updatemc);

//then later:

removeChild(mc);

var mc2:MovieClip = new AnotherMassiveLibraryMC() as MovieClip;

addChild(mc2);

mc2.addEventListener(Event.ENTER_FRAME,updatemc2);

and so on, the first MovieClip would still be in memory. Doing that a lot of times could lead to a crash. Something like this would solve that:

mc.removeEventListener(Event.ENTER_FRAME,updatemc);

removeChild(mc);

mc = null;

Inspiring
January 16, 2018

Thanks for the reply Colin.  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.  Garbage Collection is keeping the memory in check, and it isn't crashing on Android, so I don't think it is a memory leak. From the crash logs, it appears that something is taking too long for whatever reason. 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 asynchronous.

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.  But I am very intrigued by your idea on RenderMode being set to GPU, because I do have it set to GPU because of performance like you said.  I wish there was another way to improve performance and clear images faster so that GPU was not an issue, because it REALLY helps my app.

Let me know if you have any other ideas!

Thanks

Colin Holgate
Inspiring
January 16, 2018

As most things you're doing are in web view, I would make sure you're up to date with AIR (the later versions have a much better webview), and the render mode setting shouldn't matter too much. Try Direct.