1

I have noticed in my adobe air app that I get intermitent crashes while trying to close my Netconnection. The app stops responding and eventually if you keep trying to do something it crashes. It is happening around 7 out of 10 times which is weird!

Has anyone encountered this or knows whats going on?

Here is a link to the full ANR Trace: http://pastebin.com/ut0eZRrU

Thanks, any help would be appreciated. This bug is preventing me from releasing my app!

I have seen a few discussions where people are saying they are experiencing similar issues however, they also say that it has been sorted in air 3.3. I havent seen any improvement....

Here is a summary of what im getting in logcat:

D/dalvikvm( 2019): GC_CONCURRENT freed 1943K, 21% free 24500K/30855K, paused 2ms+21ms
D/dalvikvm( 2019): GC_EXPLICIT freed 769K, 20% free 24737K/30855K, paused 2ms+20ms
E/ActivityManager( 2019): ANR in air.com.test.mobile.rbttest.debug (air.com.test.mobile.rbttest.debug/.AppEntry)


E/ActivityManager( 2019): Reason: keyDispatchingTimedOut


E/ActivityManager( 2019): Load: 0.59 / 0.72 / 0.59
E/ActivityManager( 2019): CPU usage from 18567ms to 3234ms ago:


E/ActivityManager( 2019):   80% 9424/air.com.test.mobile.rbttest.debug: 71% user + 8.7% kernel / faults: 1406 minor


**could it be something to do with the line above?  Is this line saying that my cpu has spiked up to 80%?  Its weird if it is, because it works fine if I dont close the net connection!!**


E/ActivityManager( 2019):   2% 2019/system_server: 1.1% user + 0.8% kernel / faults: 39 minor
E/ActivityManager( 2019):   1.8% 2120/com.android.systemui: 1.5% user + 0.2% kernel / faults: 5 minor
E/ActivityManager( 2019):   1.5% 1885/mediaserver: 1.2% user + 0.3% kernel / faults: 4 minor
E/ActivityManager( 2019):   0.7% 1882/surfaceflinger: 0.3% user + 0.3% kernel
E/ActivityManager( 2019):   0.3% 9564/kworker/0:2: 0% user + 0.3% kernel
E/ActivityManager( 2019):   0.2% 2206/dhd_dpc: 0% user + 0.2% kernel
E/ActivityManager( 2019):   0.1% 1890/adbd: 0% user + 0.1% kernel
E/ActivityManager( 2019):   0.1% 8196/com.eolwral.osmonitor: 0% user + 0.1% kernel / faults: 20 minor
E/ActivityManager( 2019):   0.1% 8697/kworker/u:0: 0% user + 0.1% kernel
E/ActivityManager( 2019):   0.1% 965/irq/356-mxt224_: 0% user + 0.1% kernel
E/ActivityManager( 2019):   0.1% 7358/kworker/0:3: 0% user + 0.1% kernel


E/ActivityManager( 2019):   0% 3/ksoftirqd/0: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 1055/mmcqd/0: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 1830/jbd2/mmcblk0p10: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 1881/rild: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 2202/dhd_watchdog: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 2781/kworker/u:23: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 8708/kworker/u:1: 0% user + 0% kernel


E/ActivityManager( 2019):   0% 8756/com.android.settings: 0% user + 0% kernel / faults: 31 minor


E/ActivityManager( 2019):   0% 8860/com.google.android.gallery3d: 0% user + 0% kernel / faults: 8 minor


E/ActivityManager( 2019):   0% 27078/com.antivirus: 0% user + 0% kernel


E/ActivityManager( 2019): 49% TOTAL: 43% user + 6.4% kernel + 0.2% iowait + 0% softirq


E/ActivityManager( 2019): CPU usage from 707ms to 1226ms later:


E/ActivityManager( 2019):   10% 2019/system_server: 1.8% user + 9% kernel / faults: 3 minor


E/ActivityManager( 2019):     9% 2077/InputDispatcher: 0% user + 9% kernel


E/ActivityManager( 2019):   4.9% 2120/com.android.systemui: 3.9% user + 0.9% kernel / faults: 1 minor


E/ActivityManager( 2019):     3.9% 2120/ndroid.systemui: 3.9% user + 0% kernel


E/ActivityManager( 2019):   6.8% 9424/air.com.test.mobile.rbttest.debug: 0% user + 6.8% kernel


E/ActivityManager( 2019):     6.8% 9464/e.rbttest.debug: 1.7% user + 5.1% kernel


E/ActivityManager( 2019):   1.2% 7358/kworker/0:3: 0% user + 1.2% kernel


E/ActivityManager( 2019): 7.7% TOTAL: 1.9% user + 5.8% kernel
W/ActivityManager( 2019):   Force finishing activity air.com.test.mobile.rbttest.debug/.AppEntry
I/ActivityManager( 2019): Killing ProcessRecord{416f3410 9424:air.com.test.mobile.rbttest.debug/10075}: user's request
I/ActivityManager( 2019): Process air.com.test.mobile.rbttest.debug (pid 9424) has died.
I/WindowManager( 2019): WIN DEATH: Window{420baca0 SurfaceView paused=false}
I/WindowManager( 2019): WIN DEATH: Window{41f93898 air.com.test.mobile.rbttest.debug/air.com.test.mobile.rbttest.debug.A ppEntry paused=true}

UPDATE: I have found that if the NetConnection is either closed via the fms server of via the publisher then it causes the android app to crash!

Bynho
  • 572
  • 6
  • 16
  • Which version of Air? Care to show the code around closing the NetConnection? What are you doing w/the NetConnection: streaming to/from FMS, playing local file, etc. Assuming this only happens on a device only, have you been able to try on more than one type of device? (I got more, but I'll stop here :) – Sunil D. Jul 13 '12 at 16:45
  • Thanks for the quick reply Sunil... I have tried it using air 3.1, 3.2 and 3.3 to no avail. It is not working on my galaxy s2 running ics 4.0.4. the mobile app is basically doing an engagement with a desktop based air app. both of them are using the fms to handle video/audio while also utilising a server side connection for other things like messages etc. It all works fine if i dont close the conection however as soon as i close it, it crashes! – Bynho Jul 13 '12 at 16:46
  • With regards to the code, i have tried many different ways. just doing a normal netconn.close() when ending the engagement. I have also tried closing it when i have ended the engagement, changed to a different view, and then manually (via a button) telling it to close. I would also add that I have tried it on the galaxy tap 10 running honeycomb and it also crashes. I have tried running on galaxy tab 7 running gingerbread and out of all of them it seems to be the most stable, fewer crashes, but doesnt run as well due to the hardware limitations of the device – Bynho Jul 13 '12 at 16:50
  • If the other side (FMS or other client) is closing the connection, and causing the error, maybe your client side code should be checking to see if `NetConnection.connected` is `true` anytime it tries to do something w/the `NetConnection`? – Sunil D. Jul 17 '12 at 14:55
  • I did try to do that, seems to have been a bug with adobe air 3.3 though as I am currently using adobe air 3.4 beta and all is working fine! – Bynho Jul 18 '12 at 14:41

1 Answers1

0

The release of adobe air 3.4 beta seems to have fixed this issue.

Bynho
  • 572
  • 6
  • 16