AndEngine Error after loading map: Invalid Index (onUpdate) FATAL EXCEPTION: UpdateThread - android

I been working with AndEngine and got the maps the test maps to load correctly, yet when i try to load the map i created with the same textures the map loads but then i get a AndroidRuntime error
09-03 18:13:23.416: ERROR/AndroidRuntime(272): FATAL EXCEPTION: UpdateThread
09-03 18:13:23.416: ERROR/AndroidRuntime(272): java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at java.util.ArrayList.get(ArrayList.java:311)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at test.test.test.Game$2.onUpdate(Game.java:254)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.engine.handler.UpdateHandlerList.onUpdate(UpdateHandlerList.java:44)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.entity.Entity.onManagedUpdate(Entity.java:1014)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.entity.scene.Scene.onManagedUpdate(Scene.java:247)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.entity.Entity.onUpdate(Entity.java:879)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.engine.Engine.onUpdateScene(Engine.java:485)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.engine.Engine.onUpdate(Engine.java:480)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.engine.Engine.onTickUpdate(Engine.java:456)
09-03 18:13:23.416: ERROR/AndroidRuntime(272): at org.anddev.andengine.engine.Engine$UpdateThread.run(Engine.java:682)
at test.test.test.Game$2.onUpdate(Game.Java:254) points me to line in my Game class
//Gets the index of the current map
mCurrentMapIndex = Integer.parseInt(mTMXTiledMap.getTMXTiledMapProperties().get(0).getValue());
Does anybody have an idea what is causing this??
This is the second map that is loaded the first map where the character spawns loads fine
then when i step on an exit field i try to load this map and after it loads my Emulator displays the map and then crashes with the previously stated error

I had a similar problem. I believe the problem rears its ugly head when you either: attempt to load a property that doesn't exist or something of the sort can you post more code showing how you initialized your TMXMap?

I finally figured it out. When creating a new map i also created a new tile-set image for that map. The tile-set image was in the /tmx folder so the map editor could see it, but it also needed to be in the assets folder so the game could load the image. I dont understand why the map would actually load before crushing.
I will comment further if this doesnt solve the problem completely but so far it seems to work.

Related

React native white screen on launch in debug for android

Whenever I launch the app I just get a white screen and the react native packager doesn't even start loading in the terminal. I'm running on mac os and I'm running react-native 0.56.0. The project was working fine until I came back to it recently so I'm not sure whats happened. Here's my logcat filtered by Error:
09-03 23:59:04.492 1742-1757/system_process E/ActivityManager: Failure starting process com.anyone
java.lang.SecurityException: Package com.anyone is currently frozen!
at com.android.server.pm.PackageManagerService.checkPackageStartable(PackageManagerService.java:3611)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3791)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3751)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3640)
at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:1582)
at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:2663)
at com.android.server.am.ActivityStack.resumeTopActivityUncheckedLocked(ActivityStack.java:2215)
at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:2066)
at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:2056)
at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:5270)
at com.android.server.am.ActivityManagerService.removeProcessLocked(ActivityManagerService.java:6645)
at com.android.server.am.ActivityManagerService.killPackageProcessesLocked(ActivityManagerService.java:6289)
at com.android.server.am.ActivityManagerService.forceStopPackageLocked(ActivityManagerService.java:6421)
at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:2079)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
09-03 23:59:04.634 2685-
2884/com.google.android.googlequicksearchbox:search E/ActivityThread:
Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
09-03 23:59:04.636 1585-1818/? E/installd: Failed to delete /data/app/vmdl2093892881.tmp: No such file or directory
09-03 23:59:04.981 7831-7831/? E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread
09-03 23:59:05.014 2685-7866/com.google.android.googlequicksearchbox:search E/ContentStoreEUAS: Failed to commit the deferred actions
09-03 23:59:05.016 1926-2099/com.android.systemui E/ResourcesManager: failed to add asset path /data/app/com.anyone-uMDPquOdtg6BxeTvfE5l_g==/base.apk
09-03 23:59:05.016 1926-2099/com.android.systemui E/ResourcesManager: failed to add asset path /data/app/com.anyone-uMDPquOdtg6BxeTvfE5l_g==/base.apk
09-03 23:59:05.016 1926-2099/com.android.systemui E/ResourcesManager: failed to add asset path /data/app/com.anyone-uMDPquOdtg6BxeTvfE5l_g==/base.apk
09-03 23:59:05.016 1926-2099/com.android.systemui E/ResourcesManager: failed to add asset path /data/app/com.anyone-uMDPquOdtg6BxeTvfE5l_g==/base.apk
09-03 23:59:05.017 1926-2099/com.android.systemui E/ResourcesManager: failed to add asset path /data/app/com.anyone-uMDPquOdtg6BxeTvfE5l_g==/base.apk
09-03 23:59:07.113 1742-2555/system_process E/memtrack: Couldn't load memtrack module
09-03 23:59:07.360 1742-2555/system_process E/memtrack: Couldn't load memtrack module
09-03 23:59:07.614 1742-2555/system_process E/memtrack: Couldn't load memtrack module
09-03 23:59:07.865 1742-2555/system_process E/memtrack: Couldn't load memtrack module
09-03 23:59:08.114 1742-2555/system_process E/memtrack: Couldn't load memtrack module
09-03 23:59:08.314 1742-1915/system_process E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
Turned out to be an issue to do with the react-native-fbsdk node module, updating it to 0.8.0 seemed to work for me https://github.com/facebook/react-native/issues/20938

After changing gst-lib-version app falls down

I'm writing an Android App witch recieves udp videostreem and render it on display.
Before changing version of gstreamer from Congo to 1.4.0 the App stops with this:
09-03 15:38:20.630: D/GStreamer(12874): Surface destroyed
09-03 15:38:20.640: D/GStreamer+Piovra(12874): 0:04:04.929366696 0x521ecd20 jni/Piovra.c:907:gst_native_surface_finalize Releasing Native Window 0x522de008
09-03 15:38:21.020: D/GStreamer+Piovra(12874): 0:04:05.317334029 0x521ecd20 jni/Piovra.c:823:gst_native_finalize Quitting video main loop...
09-03 15:38:21.020: D/GStreamer+Piovra(12874): 0:04:05.317554696 0x521ecd20 jni/Piovra.c:827:gst_native_finalize Waiting for threads to finish...
09-03 15:38:21.020: D/GStreamer+Piovra(12874): 0:04:05.317907696 0x522ec220 jni/Piovra.c:368:video_app_function Exited main loop
09-03 15:38:21.030: D/dalvikvm(12874): threadid=13: thread exiting, not yet detached (count=0)
09-03 15:38:21.030: D/GStreamer+Piovra(12874): 0:04:05.322372363 0x522ec220 jni/Piovra.c:94:detach_current_thread Detaching thread 0x522ec220
09-03 15:38:21.030: D/GStreamer+Piovra(12874): 0:04:05.323297030 0x521ecd20 jni/Piovra.c:833:gst_native_finalize Deleting GlobalRef for app object at 0x1d200242
09-03 15:38:21.030: D/GStreamer+Piovra(12874): 0:04:05.323552030 0x521ecd20 jni/Piovra.c:835:gst_native_finalize Freeing CustomData at 0x522ec960
09-03 15:38:21.030: D/GStreamer+Piovra(12874): 0:04:05.323775030 0x521ecd20 jni/Piovra.c:838:gst_native_finalize Done finalizing
09-03 15:38:21.280: D/dalvikvm(12874): JIT unchain all for threadid=17
09-03 15:38:21.570: D/dalvikvm(12874): JIT unchain all for threadid=17
After changing of version of gstreamer from Congo to 1.4.0:
09-03 15:29:40.140: D/GStreamer+Piovra(12065): 0:06:52.864815716 0x51e21940 jni/Piovra.c:923:gst_native_pause Setting state to PAUSED
09-03 15:29:40.140: D/GStreamer+Piovra(12065): 0:06:52.864933383 0x51e21940 jni/Piovra.c:113:set_ui_message Setting message to: Setting state to PAUSED
09-03 15:29:40.150: D/GStreamer+Piovra(12065): 0:06:52.877019716 0x51f7cec0 jni/Piovra.c:113:set_ui_message Setting message to: State changed to PAUSED
09-03 15:29:40.150: E/GStreamer+Piovra(12065): 0:06:52.877265716 0x51f7cec0 jni/Piovra.c:117:set_ui_message Failed to call Java method
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.384060383 0x51e21940 jni/Piovra.c:890:gst_native_finalize Quitting video main loop...
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.385065716 0x51e21940 jni/Piovra.c:894:gst_native_finalize Waiting for threads to finish...
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.385104050 0x51f7cec0 jni/Piovra.c:435:video_app_function Exited main loop
09-03 15:29:40.660: W/libEGL(12065): eglTerminate() called w/ 2 objects remaining
09-03 15:29:40.660: D/dalvikvm(12065): threadid=13: thread exiting, not yet detached (count=0)
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.391390716 0x51f7cec0 jni/Piovra.c:94:detach_current_thread Detaching thread 0x51f7cec0
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.392429716 0x51e21940 jni/Piovra.c:900:gst_native_finalize Deleting GlobalRef for app object at 0x1d20023e
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.392723383 0x51e21940 jni/Piovra.c:902:gst_native_finalize Freeing CustomData at 0x51fa0ab8
09-03 15:29:40.660: D/GStreamer+Piovra(12065): 0:06:53.393165383 0x51e21940 jni/Piovra.c:905:gst_native_finalize Done finalizing
09-03 15:29:40.680: E/libEGL(12065): validate_display:253 error 3001 (EGL_NOT_INITIALIZED)
09-03 15:29:40.680: E/libEGL(12065): eglMakeCurrent:511 error 3008 (EGL_BAD_DISPLAY)
09-03 15:29:40.680: E/libEGL(12065): validate_display:253 error 3001 (EGL_NOT_INITIALIZED)
09-03 15:29:40.680: E/libEGL(12065): eglMakeCurrent:511 error 3008 (EGL_BAD_DISPLAY)
09-03 15:30:00.030: E/libEGL(12065): validate_display:253 error 3001 (EGL_NOT_INITIALIZED)
09-03 15:30:00.030: E/libEGL(12065): eglMakeCurrent:511 error 3008 (EGL_BAD_DISPLAY)
09-03 15:30:00.030: E/libEGL(12065): call to OpenGL ES API with no current context (logged once per thread)
09-03 15:30:00.030: E/libEGL(12065): validate_display:253 error 3001 (EGL_NOT_INITIALIZED)
09-03 15:30:00.030: E/libEGL(12065): eglMakeCurrent:511 error 3008 (EGL_BAD_DISPLAY)
09-03 15:30:00.030: W/ManagedEGLContext(12065): doTerminate failed: EGL count is 0 but managed count is 1
Any guesses about?

Can't use libspotify 12 in android app

I'm trying to load libspotify in my android app using NDK.
I'm using the library libspotify++ and jlibspotify. everything seems to be loaded but it crashes when libspotify is trying to load the library "libspotify.so.12"
I cannot use symbolic links in android.
Code:
public class Session {
static {
System.loadLibrary("spotify");
System.loadLibrary("jlibspotify");
}
}
Log:
05-29 17:27:22.559: D/dalvikvm(32606): threadid=1: still suspended after undo (sc=1 dc=1)
05-29 17:27:25.527: D/dalvikvm(32606): Trying to load lib /data/data/se.warting.spotify/lib/libspotify.so 0x41692100
05-29 17:27:25.535: D/dalvikvm(32606): Added shared lib /data/data/se.warting.spotify/lib/libspotify.so 0x41692100
05-29 17:27:25.535: D/dalvikvm(32606): No JNI_OnLoad found in /data/data/se.warting.spotify/lib/libspotify.so 0x41692100, skipping init
05-29 17:27:25.543: D/dalvikvm(32606): Trying to load lib /data/data/se.warting.spotify/lib/libjlibspotify.so 0x41692100
05-29 17:27:27.637: W/dalvikvm(32606): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lse/sony/tunefeud/spotiwrap/Session;
05-29 17:27:28.824: D/AndroidRuntime(32606): Shutting down VM
05-29 17:27:28.824: W/dalvikvm(32606): threadid=1: thread exiting with uncaught exception (group=0x40a421f8)
05-29 17:27:28.855: E/AndroidRuntime(32606): FATAL EXCEPTION: main
05-29 17:27:28.855: E/AndroidRuntime(32606): java.lang.ExceptionInInitializerError
05-29 17:27:28.855: E/AndroidRuntime(32606): at se.warting.spotify.PocActivity.onCreate(PocActivity.java:18)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.Activity.performCreate(Activity.java:4465)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.os.Handler.dispatchMessage(Handler.java:99)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.os.Looper.loop(Looper.java:137)
05-29 17:27:28.855: E/AndroidRuntime(32606): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-29 17:27:28.855: E/AndroidRuntime(32606): at java.lang.reflect.Method.invokeNative(Native Method)
05-29 17:27:28.855: E/AndroidRuntime(32606): at java.lang.reflect.Method.invoke(Method.java:511)
05-29 17:27:28.855: E/AndroidRuntime(32606): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-29 17:27:28.855: E/AndroidRuntime(32606): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-29 17:27:28.855: E/AndroidRuntime(32606): at dalvik.system.NativeStart.main(Native Method)
05-29 17:27:28.855: E/AndroidRuntime(32606): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 118 could not load needed library 'libspotify.so.12' for 'libjlibspotify.so' (load_library[1091]: Library 'libspotify.so.12' not found)
05-29 17:27:28.855: E/AndroidRuntime(32606): at java.lang.Runtime.loadLibrary(Runtime.java:370)
05-29 17:27:28.855: E/AndroidRuntime(32606): at java.lang.System.loadLibrary(System.java:535)
05-29 17:27:28.855: E/AndroidRuntime(32606): at se.warting.spotify.spotiwrap.Session.<clinit>(Session.java:6)
05-29 17:27:28.855: E/AndroidRuntime(32606): ... 15 more
This is what i get from objdump:
$arm-linux-androideabi-objdump -p libs/armeabi/libjlibspotify.so | grep NEEDED
NEEDED libspotify.so.12
NEEDED libstdc++.so
NEEDED libm.so
NEEDED libc.so
NEEDED libdl.so
$arm-linux-androideabi-objdump -p libs/armeabi/libspotify.so | grep NEEDED
NEEDED libm.so
NEEDED libc.so
NEEDED libdl.so
Does anyone know what do do to get it work?
I'll just break out my Java/JVM skills here and try applying them on Android/Dalvik.
System.loadLibrary() expects a JNI library name as its argument. In this case libspotify is not (and never is) a JNI library, but libjlibspotify seems to be. Note how the first call whines in the log about the missing JNI_OnLoad function. This is usually a good hint. System.loadLibrary() does however accept any shared library as long as it can find it, and that's why the call doesn't fail in this scenario.
Dependent libraries of a JNI library are loaded automatically by the platform's built-in shared library loading mechanisms. In this case, libjlibspotify depends on libspotify.so.12, so if there is such a file available in the loader's path, then this should be loaded automatically by the system whenever libjlibspotify is loaded.
Hence, the proper Java code in this case should be:
public class Session {
static {
System.loadLibrary("jlibspotify");
}
}
However, if the dependent library is not found as part of the System.loadLibrary() invocation, then that call will fail with an UnsatisfiedLinkError (see the log about the missing dependent libspotify.so.12 file).
libspotify 12 currently ships in the archive as libspotify.so.12.1.45 (with some symlinks libspotify.so and libspotify.so.12 pointing to that file). I don't know anything about how libjlibspotify has been built in this scenario, but if it is the case that the symlinks aren't relevant in the Android setting, then libjlibspotify should instead be built to load libspotify.so.12.1.45 from the archive, no renaming needed.
It seems you need to change build process of how you are creating the libspotify to have proper name.
Easiest way would be to use Android NDK build system - it will correctly compile and link the libraries.
The answer from Mārtiņš is correct, it should be build with Android's NDK build system.
When don't having controle over the library there is a workaround:
Instead of loading the library with System.loadLibrary( "JLibSpotify" );
i manualy copied /data/data/se.warting.spotify/lib/libspotify.so to /data/data/se.warting.spotify/libspotify.so.12
And then loaded the library with:
System.load("/data/data/se.warting.spotify/libspotify.so.12");
After that i could load jlibspotify as normal:
System.loadLibrary("jlibspotify");

Tesseract parse image and return null

I have problem in tesseract method. i use below code and my application directly stop.Below is my jni.cpp file.
struct native_data_t {
native_data_t() : image_obj(NULL), image_buffer(NULL) {}
tesseract::TessBaseAPI api;
jbyteArray image_obj;
jbyte* image_buffer;
int width, height, bpp;
char bBWFilter; // 0=disable, 1=enable
char bHorizontalDisplay;
};
native_data_t *nat = get_native_data(env, thiz);
if (nat->api.Init("/sdcard/","eng")) {
LOGE("could not initialize tesseract!");
res = JNI_FALSE;
}
can you help me?And what is datapath in this init method? thanks in advance.
my LogCat is as below.
09-03 11:52:53.186: VERBOSE/MLOG: AssetsManager.java:(2263): isAssetsInstalled(): Assets are already correctly installed
09-03 11:52:53.186: VERBOSE/MLOG: OCR.java:(2263): GetLanguage(): eng
09-03 11:52:53.206: VERBOSE/MLOG: OCR.java:(2263): setLanguage to eng
09-03 11:52:53.206: VERBOSE/MLOG: OCR.java:(2263): noLangs=1
09-03 11:52:53.206: VERBOSE/OcrLib(native)(2263): ocr_open
09-03 11:52:53.206: INFO/OcrLib(native)(2263): lang eng
09-03 11:52:53.246: ERROR/OcrLib(native)(2263): IN BASE CPP
09-03 11:52:53.246: ERROR/OcrLib(native)(2263): IN 2nd if BASE CPP
09-03 11:52:53.326: INFO/ActivityThread(2253): Publishing provider com.google.android.maps.SearchHistoryProvider: com.google.googlenav.provider.SearchHistoryProvider
09-03 11:52:54.076: INFO/ActivityManager(123): Start proc com.android.voicedialer for broadcast com.android.voicedialer/.VoiceDialerReceiver: pid=2274 uid=10016 gids={3002}
09-03 11:52:54.206: INFO/ActivityManager(123): Stopping service: com.android.vending/.util.WorkService
09-03 11:52:54.336: INFO/ActivityManager(123): Process com.temp.unique.ocr (pid 2263) has died.
09-03 11:52:54.366: DEBUG/Zygote(122): Process 2263 exited cleanly (1)
09-03 11:52:54.756: INFO/dalvikvm(2274): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38)
09-03 11:52:54.766: DEBUG/vending(261): [43] LocalAssetCache.updateOnePackage(): No local info for com.temp.unique.ocr
and my package is com.temp.unique.ocr. My application process is directly died.
There's already a JNI wrapper for Tesseract 2.04 named Tesjeract. You may want to look at its source code to see how they did it.
The datapath is the path to tessdata folder, which contains all the language data files.
There's also a JNA-based solution named Tess4J, if you're interested.

Android Hello World app crashes: IllegalArgumentException from Surface.lockCanvasNative

I am trying to run the simplest Hello World example app and looks like I can crash it even all it does is showing a TextView.
Steps to reproduce: Launch it in the emulator (1.5). Open the app - it shows the text view, then lock the phone by pressing "end call" button. Unlock by pressing "menu", then press "back". App crashes with "The process android.process.acore has stopped unexpectedly..." and Force Close button. It does not happen all the time, but I am able to reproduce it every time after wiping the user data at least.
I wonder if default Hello World is missing a detail which was considered too advanced for a hello world... Such problems with a basic example does not look very encouraging =)
Any idea what detail is missing and how to avoid this crash?
Stack (I've truncated timestamps):
37.478: DEBUG/KeyguardViewMediator(576): wakeWhenReadyLocked(82)
37.481: DEBUG/KeyguardViewMediator(576): handleWakeWhenReady(82)
37.481: DEBUG/KeyguardViewMediator(576): pokeWakelock(5000)
39.110: DEBUG/KeyguardViewMediator(576): pokeWakelock(5000)
39.140: WARN/InputManagerService(576): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#436e3fc0
40.990: ERROR/IMemory(679): binder=0x238aa8 transaction failed fd=-2147483647, size=0, err=-2147483646 (Unknown error: 2147483646)
40.990: ERROR/IMemory(679): cannot dup fd=-2147483647, size=0, err=-2147483646 (Bad file number)
40.990: ERROR/IMemory(679): cannot map BpMemoryHeap (binder=0x238aa8), size=0, fd=-1 (Bad file number)
40.990: ERROR/Surface(679): Couldn't map Surface's heap (binder=0x238aa8, heap=0x238b00)
40.990: DEBUG/AndroidRuntime(679): Shutting down VM
40.990: WARN/dalvikvm(679): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
40.990: ERROR/AndroidRuntime(679): Uncaught handler: thread main exiting due to uncaught exception
40.990: ERROR/AndroidRuntime(679): java.lang.IllegalArgumentException
40.990: ERROR/AndroidRuntime(679): at android.view.Surface.lockCanvasNative(Native Method)
40.990: ERROR/AndroidRuntime(679): at android.view.Surface.lockCanvas(Surface.java:196)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.draw(ViewRoot.java:1175)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
40.990: ERROR/AndroidRuntime(679): at android.os.Handler.dispatchMessage(Handler.java:99)
40.990: ERROR/AndroidRuntime(679): at android.os.Looper.loop(Looper.java:123)
40.990: ERROR/AndroidRuntime(679): at android.app.ActivityThread.main(ActivityThread.java:3948)
40.990: ERROR/AndroidRuntime(679): at java.lang.reflect.Method.invokeNative(Native Method)
40.990: ERROR/AndroidRuntime(679): at java.lang.reflect.Method.invoke(Method.java:521)
40.990: ERROR/AndroidRuntime(679): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
40.990: ERROR/AndroidRuntime(679): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
40.990: ERROR/AndroidRuntime(679): at dalvik.system.NativeStart.main(Native Method)
41.000: INFO/Process(576): Sending signal. PID: 679 SIG: 3
41.000: INFO/dalvikvm(679): threadid=7: reacting to signal 3
41.030: ERROR/ActivityThread(576): Failed to find provider info for android.server.checkin
41.030: ERROR/Checkin(576): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
41.070: INFO/dalvikvm(679): Wrote stack trace to '/data/anr/traces.txt'
50.940: WARN/ActivityManager(576): Launch timeout has expired, giving up wake lock!
50.980: WARN/ActivityManager(576): Activity idle timeout for HistoryRecord{4366ac40 {com.android.launcher/com.android.launcher.Launcher}}
sounds to me more like something wrong with your emulator. Why dont you delete your emulator and create a new one and try again with a fresh project.
Hope that will help you. BTW why are you using emulator on 1.5?? Start to build applications for min 2.1.
Good luck.

Categories

Resources