Skip to main content
Inspiring
June 12, 2012
Question

Captive AIR on Android force closes / whitescreens when out of disk space

  • June 12, 2012
  • 2 replies
  • 3599 views

I've been getting reports of my app either quitting as soon as it starts, or locking up on start with either a black or white screen. I'm finally able to recreate it today on a Nexus One running 2.3.6 with a nearly full phone drive (30mb free). The debug version was running fine (with external AIR runtime 3.3.0.365), but my captive-runtime production build was immediately force closing with the error below. After I rebooted, logcat reported my app starting normally with no errors, but the app would show only a white screen and never run my code. I uninstalled and went through the process again with the exact same results.

Then I noticed that although my captive-runtime apk is 25mb, SuperTool was reporting my app as 41mb. I moved the app it from Phone to SD card and it immediately started running correctly. I'm guessing that when packaging with captive runtime, AIR must unpack itself to the install location on first run, and since there was no room it would fail. There may be other causes for the whitescreen issues, but this one is confirmed.

It would be great if AIR displayed an error to the user telling them to free up disk space when this happens.

Note - I tried to force install to the SD card using android:installLocation="preferExternal" to avoid diskspace problems, but too many users reported the "Couldn't Install On USB Storage Or SD Card" Android bug so I had to switch back to "auto".

- Sarah

-------------------------------------------------------

Error I received when it was force closing immediately after install and before reboot:

I/ActivityManager(   96): Displayed air.com.sarahnorthway.rebuild2/.AppEntry: +354ms-

W/dalvikvm( 1806): No implementation found for native Lcom/adobe/air/AIRWindowSurfaceView;.nativeSurfaceCreated ()V

D/AndroidRuntime( 1806): Shutting down VM

W/dalvikvm( 1806): threadid=1: thread exiting with uncaught exception (group=0x40015560)

E/AndroidRuntime( 1806): FATAL EXCEPTION: main

E/AndroidRuntime( 1806): java.lang.UnsatisfiedLinkError: nativeSurfaceCreated

E/AndroidRuntime( 1806):           at com.adobe.air.AIRWindowSurfaceView.nativeSurfaceCreated(Native Method)

E/AndroidRuntime( 1806):           at com.adobe.air.AIRWindowSurfaceView.surfaceCreated(AIRWindowSurfaceView.java:711)

E/AndroidRuntime( 1806):           at android.view.SurfaceView.updateWindow(SurfaceView.java:543)

E/AndroidRuntime( 1806):           at android.view.SurfaceView.dispatchDraw(SurfaceView.java:348)

E/AndroidRuntime( 1806):           at android.view.View.draw(View.java:6883)

E/AndroidRuntime( 1806):           at android.view.SurfaceView.draw(SurfaceView.java:334)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.drawChild(ViewGroup.java:1646)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.drawChild(ViewGroup.java:1644)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.drawChild(ViewGroup.java:1644)

E/AndroidRuntime( 1806):           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)

E/AndroidRuntime( 1806):           at android.view.View.draw(View.java:6883)

E/AndroidRuntime( 1806):           at android.widget.FrameLayout.draw(FrameLayout.java:357)

E/AndroidRuntime( 1806):           at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1862)

E/AndroidRuntime( 1806):           at android.view.ViewRoot.draw(ViewRoot.java:1522)

E/AndroidRuntime( 1806):           at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)

E/AndroidRuntime( 1806):           at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)

E/AndroidRuntime( 1806):           at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 1806):           at android.os.Looper.loop(Looper.java:130)

E/AndroidRuntime( 1806):           at android.app.ActivityThread.main(ActivityThread.java:3683)

E/AndroidRuntime( 1806):           at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 1806):           at java.lang.reflect.Method.invoke(Method.java:507)

E/AndroidRuntime( 1806):           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

E/AndroidRuntime( 1806):           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

E/AndroidRuntime( 1806):           at dalvik.system.NativeStart.main(Native Method)

W/ActivityManager(   96):   Force finishing activity air.com.sarahnorthway.rebuild2/.AppEntry

This topic has been closed for replies.

2 replies

edmunditor
Participating Frequently
August 14, 2013

Was this issue ever resolved? I'm getting the same result on an old Samsung Galaxy Ace. It seems to crash immediately after running my app with the same error.

Colin Holgate
Inspiring
June 12, 2012

As you see in that article, people can update to 2.3 to fix the installing on SD issue. There are other reasons to want to limit to 2.3, so maybe you should require that version, then you can safely use the preferexternal option.

Inspiring
June 12, 2012

I've considered this, but about 5% of my active installs are running 2.2, and all of the other bugs my users have reported (like this white screen issue) also happen in 2.3+. Do you know of any other prominant issues in 2.2 / reasons to upgrade?

Colin Holgate
Inspiring
June 12, 2012

The one I had in mind is to do with orientation changes. There's a changed event that works in Android 2.2, but the changing event only works in iOS and Android 2.3 and later.