oussdag / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

IMSDroid fails to run in emulator (SVN revision 354) #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. fresh SVN retrieve (rev 354 currently)
2. clean build
3. run/debug under emulator, details on AVD
   - Target: Google API's (API level 8)
   - Skin: HVGA
   - SD Card: 100M
   - hw.sdCard: yes
   - hw.lcd.density: 160

What is the expected output? 
IMSDroid to run under AVD emulation

What do you see instead?
IMSDroid fails to start

What version of the product are you using? On what operating system?
SVN rev 354, AVD 2.2 (level 8) emulation on Win7 64-bit

Please provide any additional information below.

Console Output:
[2011-01-05 19:57:41 - imsdroid] Android Launch!
[2011-01-05 19:57:41 - imsdroid] adb is running normally.
[2011-01-05 19:57:41 - imsdroid] Performing org.doubango.imsdroid.Main activity 
launch
[2011-01-05 19:57:41 - imsdroid] Automatic Target Mode: using existing emulator 
'emulator-5554' running compatible AVD 'GDroid-2_2'
[2011-01-05 19:57:43 - imsdroid] Application already deployed. No need to 
reinstall.
[2011-01-05 19:57:43 - imsdroid] Starting activity org.doubango.imsdroid.Main 
on device 
[2011-01-05 19:57:44 - imsdroid] ActivityManager: Starting: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
cmp=org.doubango.imsdroid/.Main }
[2011-01-05 19:57:45 - imsdroid] Attempting to connect debugger to 
'org.doubango.imsdroid' on port 8606

LogCat output:
01-05 19:57:41.733: DEBUG/AndroidRuntime(381): >>>>>>>>>>>>>> AndroidRuntime 
START <<<<<<<<<<<<<<
01-05 19:57:41.733: DEBUG/AndroidRuntime(381): CheckJNI is ON
01-05 19:57:41.923: DEBUG/AndroidRuntime(381): --- registering native functions 

---
01-05 19:57:42.963: DEBUG/AndroidRuntime(381): Shutting down VM
01-05 19:57:42.973: DEBUG/dalvikvm(381): Debugger has detached; object registry 
had 1 entries
01-05 19:57:42.993: INFO/AndroidRuntime(381): NOTE: attach of thread 'Binder 
Thread #3' failed
01-05 19:57:43.443: DEBUG/AndroidRuntime(389): >>>>>>>>>>>>>> AndroidRuntime 
START <<<<<<<<<<<<<<
01-05 19:57:43.443: DEBUG/AndroidRuntime(389): CheckJNI is ON
01-05 19:57:43.643: DEBUG/AndroidRuntime(389): --- registering native functions 

---
01-05 19:57:44.443: INFO/ActivityManager(60): Force stopping package 
org.doubango.imsdroid uid=10036
01-05 19:57:44.443: INFO/ActivityManager(60): Starting activity: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
flg=0x10000000 cmp=org.doubango.imsdroid/.Main }
01-05 19:57:44.523: INFO/ActivityManager(60): Start proc org.doubango.imsdroid 
for activity org.doubango.imsdroid/.Main: pid=395 uid=10036 gids={3003, 1015, 
1006}
01-05 19:57:44.543: DEBUG/AndroidRuntime(389): Shutting down VM
01-05 19:57:44.553: DEBUG/dalvikvm(389): Debugger has detached; object registry 
had 1 entries
01-05 19:57:44.633: INFO/AndroidRuntime(389): NOTE: attach of thread 'Binder 
Thread #3' failed
01-05 19:57:45.143: WARN/ActivityThread(395): Application org.doubango.imsdroid 
is waiting for the debugger on port 8100...
01-05 19:57:45.183: INFO/System.out(395): Sending WAIT chunk
01-05 19:57:45.193: INFO/dalvikvm(395): Debugger is active
01-05 19:57:45.243: INFO/System.out(395): Debugger has connected
01-05 19:57:45.243: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:45.483: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:45.683: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:45.883: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:46.084: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:46.293: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:46.343: DEBUG/SntpClient(60): request time failed: 
java.net.SocketException: Address family not supported by protocol
01-05 19:57:46.493: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:46.693: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:46.893: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:47.101: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:47.304: INFO/System.out(395): waiting for debugger to settle...
01-05 19:57:47.513: INFO/System.out(395): debugger has settled (1319)
01-05 19:57:48.113: DEBUG/dalvikvm(395): Trying to load lib 
/data/data/org.doubango.imsdroid/lib/libtinyWRAP.so 0x43e38108
01-05 19:57:48.173: DEBUG/dalvikvm(395): Added shared lib 
/data/data/org.doubango.imsdroid/lib/libtinyWRAP.so 0x43e38108
01-05 19:57:48.173: DEBUG/dalvikvm(395): No JNI_OnLoad found in 
/data/data/org.doubango.imsdroid/lib/libtinyWRAP.so 0x43e38108, skipping init
01-05 19:57:48.403: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** 
*** *** *** *** ***
01-05 19:57:48.414: INFO/DEBUG(31): Build fingerprint: 
'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
01-05 19:57:48.414: INFO/DEBUG(31): pid: 395, tid: 395  >>> 
org.doubango.imsdroid <<<
01-05 19:57:48.423: INFO/DEBUG(31): signal 4 (SIGILL), fault addr 81261944
01-05 19:57:48.423: INFO/DEBUG(31):  r0 0000aa50  r1 43e4a628  r2 4104bc48  r3 
45b5be7c
01-05 19:57:48.433: INFO/DEBUG(31):  r4 be9ed540  r5 00000003  r6 45b8bafd  r7 
4104bc14
01-05 19:57:48.433: INFO/DEBUG(31):  r8 be9ed520  r9 4104bc0c  10 0000ce04  fp 
4104bc0c
01-05 19:57:48.433: INFO/DEBUG(31):  ip 81261940  sp be9ed508  lr 80813978  pc 
81261944  cpsr a0000010
01-05 19:57:48.543: INFO/DEBUG(31):          #00  pc 00261944  
/data/data/org.doubango.imsdroid/lib/libtinyWRAP.so
01-05 19:57:48.543: INFO/DEBUG(31):          #01  pc 00013974  
/system/lib/libdvm.so
01-05 19:57:48.553: INFO/DEBUG(31):          #02  pc 0003ddb4  
/system/lib/libdvm.so
01-05 19:57:48.553: INFO/DEBUG(31):          #03  pc 00037186  
/system/lib/libdvm.so
01-05 19:57:48.563: INFO/DEBUG(31):          #04  pc 000432ec  
/system/lib/libdvm.so
01-05 19:57:48.563: INFO/DEBUG(31):          #05  pc 00024dcc  
/system/lib/libdvm.so
01-05 19:57:48.573: INFO/DEBUG(31):          #06  pc 0001d7cc  
/system/lib/libdvm.so
01-05 19:57:48.573: INFO/DEBUG(31):          #07  pc 00053eec  
/system/lib/libdvm.so
01-05 19:57:48.583: INFO/DEBUG(31):          #08  pc 00054102  
/system/lib/libdvm.so
01-05 19:57:48.583: INFO/DEBUG(31):          #09  pc 0005f198  
/system/lib/libdvm.so
01-05 19:57:48.593: INFO/DEBUG(31):          #10  pc 00060a6c  
/system/lib/libdvm.so
01-05 19:57:48.593: INFO/DEBUG(31):          #11  pc 00029a90  
/system/lib/libdvm.so
01-05 19:57:48.603: INFO/DEBUG(31):          #12  pc 0001d7cc  
/system/lib/libdvm.so
01-05 19:57:48.603: INFO/DEBUG(31):          #13  pc 00053eec  
/system/lib/libdvm.so
01-05 19:57:48.613: INFO/DEBUG(31):          #14  pc 00054102  
/system/lib/libdvm.so
01-05 19:57:48.613: INFO/DEBUG(31):          #15  pc 0005ac24  
/system/lib/libdvm.so
01-05 19:57:48.623: INFO/DEBUG(31):          #16  pc 00024dcc  
/system/lib/libdvm.so
01-05 19:57:48.623: INFO/DEBUG(31):          #17  pc 0001d7cc  
/system/lib/libdvm.so
01-05 19:57:48.623: INFO/DEBUG(31):          #18  pc 0005408e  
/system/lib/libdvm.so
01-05 19:57:48.633: INFO/DEBUG(31):          #19  pc 0005bde2  
/system/lib/libdvm.so
01-05 19:57:48.633: INFO/DEBUG(31):          #20  pc 00018714  
/system/lib/libdvm.so
01-05 19:57:48.644: INFO/DEBUG(31):          #21  pc 0001e8c4  
/system/lib/libdvm.so
01-05 19:57:48.653: INFO/DEBUG(31):          #22  pc 0001d790  
/system/lib/libdvm.so
01-05 19:57:48.653: INFO/DEBUG(31):          #23  pc 00053eec  
/system/lib/libdvm.so
01-05 19:57:48.663: INFO/DEBUG(31):          #24  pc 0004072c  
/system/lib/libdvm.so
01-05 19:57:48.663: INFO/DEBUG(31):          #25  pc 00034454  
/system/lib/libdvm.so
01-05 19:57:48.673: INFO/DEBUG(31):          #26  pc 0002c930  
/system/lib/libandroid_runtime.so
01-05 19:57:48.673: INFO/DEBUG(31):          #27  pc 0002d85c  
/system/lib/libandroid_runtime.so
01-05 19:57:48.673: INFO/DEBUG(31):          #28  pc 00008c86  
/system/bin/app_process
01-05 19:57:48.673: INFO/DEBUG(31):          #29  pc 0000d362  
/system/lib/libc.so
01-05 19:57:48.673: INFO/DEBUG(31): code around pc:
01-05 19:57:48.673: INFO/DEBUG(31): 81261924 e2833008 e5842004 e5843000 
e8bd8070 
01-05 19:57:48.683: INFO/DEBUG(31): 81261934 00168cc4 00001610 00000000 
e92d4037 
01-05 19:57:48.683: INFO/DEBUG(31): 81261944 eddf0b0b e1a05000 edcd0b00 
e3a00018 
01-05 19:57:48.683: INFO/DEBUG(31): 81261954 ebf7c12c e1a01005 e1a04000 
ebffffe2 
01-05 19:57:48.683: INFO/DEBUG(31): 81261964 e1a00004 e59d1004 e28dd00c 
e8bd8030 
01-05 19:57:48.683: INFO/DEBUG(31): code around lr:
01-05 19:57:48.683: INFO/DEBUG(31): 80813958 3497c004 3488c004 3afffff9 
e2888004 
01-05 19:57:48.683: INFO/DEBUG(31): 80813968 eafffff9 e899000c e594c008 
e12fff3c 
01-05 19:57:48.693: INFO/DEBUG(31): 80813978 e3550000 1594c00c 188c0003 
e914a3f0 
01-05 19:57:48.693: INFO/DEBUG(31): 80813988 e1a05e22 e5946004 e3a02000 
e4d6c001 
01-05 19:57:48.693: INFO/DEBUG(31): 80813998 e35c0000 0a000007 e2822001 
e35c0044 
01-05 19:57:48.693: INFO/DEBUG(31): stack:
01-05 19:57:48.693: INFO/DEBUG(31):     be9ed4c8  00000000  
01-05 19:57:48.693: INFO/DEBUG(31):     be9ed4cc  afd103f0  /system/lib/libc.so
01-05 19:57:48.693: INFO/DEBUG(31):     be9ed4d0  afd41724  /system/lib/libc.so
01-05 19:57:48.693: INFO/DEBUG(31):     be9ed4d4  000000dc  
01-05 19:57:48.703: INFO/DEBUG(31):     be9ed4d8  000013fc  
01-05 19:57:48.703: INFO/DEBUG(31):     be9ed4dc  000001b8  
01-05 19:57:48.703: INFO/DEBUG(31):     be9ed4e0  412647f8  
/dev/ashmem/dalvik-LinearAlloc (deleted)
01-05 19:57:48.713: INFO/DEBUG(31):     be9ed4e4  00000374  
01-05 19:57:48.713: INFO/DEBUG(31):     be9ed4e8  0000ce04  [heap]
01-05 19:57:48.713: INFO/DEBUG(31):     be9ed4ec  afd0be39  /system/lib/libc.so
01-05 19:57:48.723: INFO/DEBUG(31):     be9ed4f0  00000000  
01-05 19:57:48.723: INFO/DEBUG(31):     be9ed4f4  b0004998  /system/bin/linker
01-05 19:57:48.723: INFO/DEBUG(31):     be9ed4f8  b0014df4  
01-05 19:57:48.733: INFO/DEBUG(31):     be9ed4fc  81261940  
/data/data/org.doubango.imsdroid/lib/libtinyWRAP.so
01-05 19:57:48.733: INFO/DEBUG(31):     be9ed500  df002777  
01-05 19:57:48.733: INFO/DEBUG(31):     be9ed504  e3a070ad  
01-05 19:57:48.743: INFO/DEBUG(31): #00 be9ed508  0000aa50  [heap]
01-05 19:57:48.743: INFO/DEBUG(31):     be9ed50c  43e4a628  
/dev/ashmem/mspace/dalvik-heap/2 (deleted)
01-05 19:57:48.743: INFO/DEBUG(31):     be9ed510  4104bc48  
01-05 19:57:48.753: INFO/DEBUG(31):     be9ed514  be9ed540  [stack]
01-05 19:57:48.753: INFO/DEBUG(31):     be9ed518  00000003  
01-05 19:57:48.753: INFO/DEBUG(31):     be9ed51c  80813978  
/system/lib/libdvm.so
01-05 19:57:48.763: INFO/DEBUG(31): #01 be9ed520  4125f6ac  
/dev/ashmem/dalvik-LinearAlloc (deleted)
01-05 19:57:48.763: INFO/DEBUG(31):     be9ed524  0000ccb0  [heap]
01-05 19:57:48.763: INFO/DEBUG(31):     be9ed528  45b8bafd  
/data/dalvik-cache/data@app@org.doubango.imsdroid-1.apk@classes.dex
01-05 19:57:48.773: INFO/DEBUG(31):     be9ed52c  be9ed628  [stack]
01-05 19:57:48.773: INFO/DEBUG(31):     be9ed530  412647f8  
/dev/ashmem/dalvik-LinearAlloc (deleted)
01-05 19:57:48.773: INFO/DEBUG(31):     be9ed534  00000374  
01-05 19:57:48.783: INFO/DEBUG(31):     be9ed538  be9ed540  [stack]
01-05 19:57:48.783: INFO/DEBUG(31):     be9ed53c  8083ddb7  
/system/lib/libdvm.so
01-05 19:57:49.554: DEBUG/Zygote(33): Process 395 terminated by signal (4)
01-05 19:57:49.563: INFO/ActivityManager(60): Process org.doubango.imsdroid 
(pid 395) has died.
01-05 19:57:49.604: INFO/UsageStats(60): Unexpected resume of 
com.android.launcher while already resumed in org.doubango.imsdroid
01-05 19:57:49.624: INFO/BootReceiver(60): Copying 
/data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
01-05 19:57:49.764: DEBUG/dalvikvm(60): GC_FOR_MALLOC freed 6282 objects / 
669448 bytes in 98ms
01-05 19:57:49.764: WARN/InputManagerService(60): Window already focused, 
ignoring focus gain of: 
com.android.internal.view.IInputMethodClient$Stub$Proxy@440b0820

Source level trace:

* just dies at ...\imsdroid\src\org\doubango\imsdroid\Main.java line 131 
        // Sets main activity (should be done before starting services)
        ServiceManager.setMainActivity(this);    
* no call stack
* from LogCat it looks like the emulator is choking on loading the JNI boundary

Original issue reported on code.google.com by rich.ho...@gmail.com on 6 Jan 2011 at 1:08

GoogleCodeExporter commented 9 years ago
ServiceManager.java contains a static block of code which is used to load the 
native library("libtinyWRAP.so"). According to your trace, loading the native 
code fails with a SIGILL error (malformed binary code). Are you sure you are 
using an ARM (v5te or later) emulator?
To fix the issue you have to rebuild "tinywrap" with debug symbols (-g option) 
and send the log again.

Original comment by boss...@yahoo.fr on 7 Jan 2011 at 3:38

GoogleCodeExporter commented 9 years ago
Thank you for the tips... And yes I did see the static method loading 
tinyWrap.so and the timing of that load operation and the trace displaying the 
SIGILL error. I figured they were related but I wasn't sure what compiler 
issues were causing the problem. Now that you explained it this way, makes 
total sense (ARMv5 trying to ARMv7 wouldn't be too happy).

You solved my issue:
1. I had built Doubango w/ NEON optimizations (ARMv7).
2. But I was running an ARMv5 emulator (Win7 64-bit)
3. I rebuilt Doubango as you directed, ARMv5te target, with "-g -O0"
4. IMSDroid runs under emulation now!

Probably worth adding a line or two in the specs for folks that are rebuilding 
Doubango as well as IMSDroid. Thanks for the guidance!

Original comment by rich.ho...@gmail.com on 9 Jan 2011 at 11:21

GoogleCodeExporter commented 9 years ago
The package manager should automatically detect your cpu before installing the 
application. In your case (ARMv5te) the manager should choose 
"imsdroid/libs/armeabi/libtinyWrap.so". Libraries build with NEON optimizations 
MUST be copied to "imsdroid/libs/armeabi-v7a" instead of 
"imsdroid/libs/armeabi".

Original comment by boss...@yahoo.fr on 10 Jan 2011 at 5:47

GoogleCodeExporter commented 9 years ago
OK, Just in testing mode I was deleting the pre-built stacks from SVN and 
placing a Doubango version I built (ARMv5 or ARMv7) in the armeabi folder, 
leaving armeabi-v7a empty, just trying to figure out what was going on...

Your packaging clarification makes it easier to support ARMv5 and ARMv7 without 
resetting the libraries.

For me and my configuration, the critical part to get emulation working with a 
home-built Doubango stack was ensuring I built Doubango with "-g -O0".

Original comment by rich.ho...@gmail.com on 10 Jan 2011 at 5:55

GoogleCodeExporter commented 9 years ago
You can leave the default (optimized) CFLAGS (-0s) unless you are debugging the 
native code. 

Original comment by boss...@yahoo.fr on 11 Jan 2011 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 13 Jan 2011 at 5:22