Application works in Android 1.5 but not 2.2 – Education Career Blog

The spinning globe application unning on the emulator works on android 1.5 as target but puts out a “force close application” error in android 2.2 target. Where should i look to find the problem ?

I have enclosed the logcat details that I get,

D/MediaScanner(  183):  prescan time: 4913ms
D/MediaScanner(  183):     scan time: 693ms
D/MediaScanner(  183): postscan time: 45ms
D/MediaScanner(  183):    total time: 5651ms
D/MediaScannerService(  183): done scanning volume internal
I/PackageManager(   67): Removing non-system package:com.android.SpinningGlobe
I/ActivityManager(   67): Force stopping package com.android.SpinningGlobe uid=10038
D/dalvikvm(  127): GC_EXPLICIT freed 12963 objects / 655936 bytes in 168ms
D/PackageManager(   67): Scanning package com.android.SpinningGlobe
I/PackageManager(   67): Package com.android.SpinningGlobe codePath changed from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk; Retaining data and using new
I/PackageManager(   67): /data/app/com.android.SpinningGlobe-1.apk changed; unpacking
D/installd(   34): DexInv: --- BEGIN '/data/app/com.android.SpinningGlobe-1.apk' ---
D/dalvikvm(  255): DexOpt: load 214ms, verify 229ms, opt 5ms
D/installd(   34): DexInv: --- END '/data/app/com.android.SpinningGlobe-1.apk' success)---
W/PackageManager(   67): Code path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
W/PackageManager(   67): Resource path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager(   67): Force stopping package com.android.SpinningGlobe uid=10038
D/PackageManager(   67):   Activities: com.android.SpinningGlobe.GLApp
I/installd(   34): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
D/PackageManager(   67): New package installed in /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager(   67): Force stopping package com.android.SpinningGlobe uid=10038
I/ActivityManager(   67): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=256 uid=10028 gids={}
D/dalvikvm(  167): GC_EXPLICIT freed 3943 objects / 244424 bytes in 1708ms
D/dalvikvm(   67): GC_EXPLICIT freed 7297 objects / 468432 bytes in 667ms
W/RecognitionManagerService(   67): no available voice recognition services found
I/ActivityThread(  256): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider
I/installd(   34): unlink /data/dalvik-cache/[email protected]@[email protected]
D/AndroidRuntime(  118): Shutting down VM
D/jdwp    (  118): adbd disconnected
I/AndroidRuntime(  118): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime(  266):
D/AndroidRuntime(  266): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  266): CheckJNI is ON
D/AndroidRuntime(  266): --- registering native functions ---
I/ActivityManager(   67): Starting activity: Intent { act=android.intent.action.MAIN cat=android.intent.category.LAUNCHER flg=0x10000000 cmp=com.android.SpinningGlobe/.GLApp }
D/AndroidRuntime(  266): Shutting down VM
D/jdwp    (  266): adbd disconnected
I/AndroidRuntime(  266): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager(   67): Start proc com.android.SpinningGlobe for activity com.android.SpinningGlobe/.GLApp: pid=273 uid=10038 gids={1015}
I/ARMAssembler(   67): generated scanline__00000077:03545404_00000004_00000000  47 ipp (67 ins) at 0x32b4a0:0x32b5ac in 3627836 ns
D/libEGL  (  273): egl.cfg not found, using default config
D/libEGL  (  273): loaded /system/lib/egl/libGLES_android.so
D/dalvikvm(  273): GC_EXTERNAL_ALLOC freed 839 objects / 59328 bytes in 151ms
W/dalvikvm(  273): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
I/ActivityManager(   67): Displayed activity com.android.SpinningGlobe/.GLApp: 4870 ms (total 4870 ms)
E/AndroidRuntime(  273): FATAL EXCEPTION: GLThread 8
E/AndroidRuntime(  273): java.lang.IndexOutOfBoundsException
E/AndroidRuntime(  273):        at java.nio.IntArrayBuffer.get(IntArrayBuffer.java:63)
E/AndroidRuntime(  273):        at com.android.SpinningGlobe.GLRenderer.onDrawFrame(GLRenderer.java:105)
E/AndroidRuntime(  273):        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
E/AndroidRuntime(  273):        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
W/ActivityManager(   67):   Force finishing activity com.android.SpinningGlobe/.GLApp
I/ARMAssembler(   67): generated scanline__00000077:03515104_00000000_00000000  33 ipp (47 ins) at 0x33f9a8:0x33fa64 in 1258819 ns

Any insights on where the problem could be ?

,

You should look at the log from the emulator.

You can get this on the command line using:

adb logcat

Or if you’re using the ADT Plugin for Eclipse the log is visible there. If you can’t see it select Window ▶ Show View ▶ Other… and then select Android ▶ LogCat.

It’s probably also worth reading the Debugging page in the Android Developer Documentation.

,

Recompile it under 2.2 and look for deprecated warnings

Leave a Comment