android program crashed when shell script execute
<p>I've created backup script which is copying files using cp adb shell command. After days of testing i am really confused because sometimes program crashed and i just dont know why. What should i do to avoid this problem?</p>

<p>I refresh my custom BaseAdapter every time when the copy finished. I dont think it is draw view problem after using notifyDataSetChanged() or meybe? Below my LogCat output.</p>

<p>When loop is executing command after command i got a lot of green (INFO/DEBUG) information then my program crash...</p>

<pre><code>...
DEBUG/exec  cp /data/app/org.apache.android.media-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/org.apache.android.media.apk
DEBUG/exec  cp /data/app/com.cyrilmottier.android.listviewtipsandtricks-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.cyrilmottier.android.listviewtipsandtricks.apk
DEBUG/exec  cp /data/app/org.alexis.littre-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/org.alexis.littre.apk
DEBUG/exec  cp /data/app/jp.susatthi.ManifestViewer-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/jp.susatthi.ManifestViewer.apk
DEBUG/exec  cp /data/app/com.mxtech.videoplayer.ad-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.mxtech.videoplayer.ad.apk
DEBUG/exec  cp /data/app/com.rerware.android.MyBackupRoot-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.rerware.android.MyBackupRoot.apk
INFO/DEBUG  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
INFO/DEBUG  Build fingerprint: 'samsung/GT-I9000/GT-I9000/GT-I9000:2.2/FROYO/XWJPH:user/release-keys'
INFO/DEBUG  pid: 8761, tid: 8761  &gt;&gt;&gt; pl.backup &lt;&lt;&lt;
INFO/DEBUG  signal 11 (SIGSEGV), fault addr 00001fd8
INFO/DEBUG   r0 00000035  r1 482347e0  r2 003fbf80  r3 4003fbf8
INFO/DEBUG   r4 007f7f00  r5 00001fa0  r6 bef5a240  r7 00001f84
INFO/DEBUG   r8 00000000  r9 000001fb  10 4003fbf8  fp 4818e7b8
INFO/DEBUG   ip 4b58caa7  sp bef5a1f8  lr 4b58ccdb  pc 4b58c690  cpsr 28000030
INFO/DEBUG   d0  6472656767756265  d1  0000005a41400000
INFO/DEBUG   d2  0000003c00000003  d3  0044abb800000001
INFO/DEBUG   d4  0000000000000000  d5  0000000000000000
INFO/DEBUG   d6  0000000100000001  d7  408000003f800000
INFO/DEBUG   d8  4194000041900000  d9  3ff0000000000012
INFO/DEBUG   d10 3ff0000000000000  d11 0000000000000000
INFO/DEBUG   d12 0000000000000000  d13 0000000000000000
INFO/DEBUG   d14 0000000000000000  d15 0000000000000000
INFO/DEBUG   d16 0000000700000000  d17 c053000000000000
INFO/DEBUG   d18 0000000000000000  d19 0000000000000000
INFO/DEBUG   d20 3ff0000000000000  d21 8000000000000000
INFO/DEBUG   d22 0000000000000000  d23 0006000300070002
INFO/DEBUG   d24 0101010101010101  d25 0000000000000000
INFO/DEBUG   d26 0016001600170016  d27 0016001600170016
INFO/DEBUG   d28 002f002e002f002e  d29 3ff0000000000000
INFO/DEBUG   d30 0000000000000000  d31 3ff0000000000000
INFO/DEBUG   scr 60000012
DEBUG/exec  cp /data/app/com.androidemu.n64-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.androidemu.n64.apk
DEBUG/exec  cp /data/app/com.androidemu.nes-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.androidemu.nes.apk
INFO/DEBUG           #00  pc 4b58c690  /dev/ashmem/dalvik-jit-code-cache (deleted)
INFO/DEBUG           #01  lr 4b58ccdb  /dev/ashmem/dalvik-jit-code-cache (deleted)
INFO/DEBUG  code around pc:
INFO/DEBUG  4b58c670 01000100 00280000 4321c584 01020018 
INFO/DEBUG  4b58c680 43dcdd1a 49190054 f2a568b0 2800071c 
INFO/DEBUG  4b58c690 63e963a8 c703d010 a1094c13 f7aea20a 
INFO/DEBUG  4b58c6a0 e011ed78 f8d7e008 290000ec 6ef7dc01 
INFO/DEBUG  4b58c6b0 a10347b8 ecf2f7ae 6df1480b 1c2d4788 
INFO/DEBUG  code around lr:
INFO/DEBUG  4b58ccb8 1c0800cc 1c116029 071cf2a5 606a2800 
INFO/DEBUG  4b58ccc8 c703d010 a1094c13 f7aea20a e011ea5e 
INFO/DEBUG  4b58ccd8 f8d7e008 29000698 6ef7dc01 a10347b8 
INFO/DEBUG  4b58cce8 e9d8f7ae 6df1480b 1c2d4788 4300e047 
INFO/DEBUG  4b58ccf8 43cecc74 0000e7fe 00000000 00000000 
INFO/DEBUG  stack:
INFO/DEBUG      bef5a1b8  40020e00  /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
INFO/DEBUG      bef5a1bc  80945327  /system/lib/libdvm.so
INFO/DEBUG      bef5a1c0  430cb368  
INFO/DEBUG      bef5a1c4  440990a5  /system/framework/framework.odex
INFO/DEBUG      bef5a1c8  00000000  
INFO/DEBUG      bef5a1cc  8094d7c7  /system/lib/libdvm.so
INFO/DEBUG      bef5a1d0  809a23f4  /system/lib/libdvm.so
INFO/DEBUG      bef5a1d4  00000001  
INFO/DEBUG      bef5a1d8  00000001  
INFO/DEBUG      bef5a1dc  00000008  
INFO/DEBUG      bef5a1e0  430cb304  
INFO/DEBUG      bef5a1e4  43d3e79a  /system/framework/framework.odex
INFO/DEBUG      bef5a1e8  43cece82  /system/framework/framework.odex
INFO/DEBUG      bef5a1ec  80973339  /system/lib/libdvm.so
INFO/DEBUG      bef5a1f0  df002777  
INFO/DEBUG      bef5a1f4  e3a070ad  
INFO/DEBUG  #00 bef5a1f8  438bc000  /system/framework/core.odex
INFO/DEBUG      bef5a1fc  bef5a240  [stack]
INFO/DEBUG      bef5a200  0028cb90  [heap]
INFO/DEBUG      bef5a204  0000cd38  [heap]
INFO/DEBUG      bef5a208  000361b0  [heap]
INFO/DEBUG      bef5a20c  000003a0  
INFO/DEBUG      bef5a210  809a22e0  /system/lib/libdvm.so
INFO/DEBUG      bef5a214  809a6ee0  /system/lib/libdvm.so
INFO/DEBUG      bef5a218  bef5a4e8  [stack]
INFO/DEBUG      bef5a21c  80922798  /system/lib/libdvm.so
INFO/DEBUG      bef5a220  0000cd30  [heap]
INFO/DEBUG      bef5a224  bef5a240  [stack]
INFO/DEBUG      bef5a228  8092271c  /system/lib/libdvm.so
INFO/DEBUG      bef5a22c  00000000  
INFO/DEBUG      bef5a230  000003a0  
INFO/DEBUG      bef5a234  80921638  /system/lib/libdvm.so
INFO/DEBUG      bef5a238  bef5a3ac  [stack]
INFO/DEBUG      bef5a23c  bef5a3ac  [stack]
DEBUG/exec  cp /data/app/com.opera.browser-1.apk /mnt/sdcard/allbackup/backup/2012-08-09_18@51@47!63/apps/com.opera.browser.apk
INFO/DEBUG  dumpmesg &gt; /data/log/dumpstate_app_native.log
INFO/BootReceiver   Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
INFO/dumpstate  begin
DEBUG/dalvikvm  GC_FOR_MALLOC freed 15878 objects / 1113800 bytes in 802ms
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
INFO/dalvikvm   threadid=3: reacting to signal 3
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (379 of 2308
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   threadid=3: reacting to signal 3
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (1785 of 2784
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (-1 of 3335
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (-1 of 2316
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (-1 of 2337
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
ERROR/dalvikvm  Failed to write stack traces to /data/anr/traces.txt (1870 of 4332
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
INFO/dalvikvm   Wrote stack traces to '/data/anr/traces.txt'
DEBUG/SntpClient    request time failed: java.net.UnknownHostException: north-america.pool.ntp.org
DEBUG/SntpClient    request time failed: java.net.UnknownHostException: north-america.pool.ntp.org
DEBUG/SntpClient    request time failed: java.net.UnknownHostException: north-america.pool.ntp.org
DEBUG/VoldCmdListener   asec list
INFO/dumpstate  done
DEBUG/Zygote    Process 8761 terminated by signal (11)
</code></pre>
