Captive AIR on Android force closes / whitescreens when out of disk space
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
