Android Question App error

pgargom

Member
Licensed User
Longtime User
Hi Erel,
I want to ask and question about an error that i have in my app.
i am working in an app that execute a timer that each 5 seconds change an html view of a webview. This app works with a usb conexion with a microcontroller. It works with a server socket too, and 10 minutes later that i execute this app (more or less), it crash and i have this Log.

B4X:
Timer Tick
init
Timer Tick
init
handleInetConditionHoldEnd: net=1, condition=0, published condition=0
Timer Tick
JNI ERROR (app bug): attempt to use stale global reference 0x1d200366
VM aborting
Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'iNet/nuclear_evb/nuclear-evb:4.0.4/IMM76D/20130115:eng/test-keys'
pid: 1707, tid: 1727  >>> MuralShopping.Carteleria <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
r0 00000000  r1 020417a0  r2 00000000  r3 00000000
r4 deadd00d  r5 40885c58  r6 0000020c  r7 00000001
r8 40fe5b98  r9 0228da78  10 00000000  fp 40a87ab0
ip 00000000  sp 4a74f9e0  lr 4081e847  pc 4081e846  cpsr 60000030
d0  74726f6261204d56  d1  74706d657474616e
d2  8414e812c6100275  d3  920c1c580225846c
d4  0da21000012394e0  d5  044bc410ef34a340
d6  67ac016181c43901  d7  e0033964d11000a1
d8  c190000000000000  d9  461c400000001afc
d10 00000000443a8419  d11 0000000000000000
d12 0000000000000000  d13 0000000000000000
d14 0000000000000000  d15 0000000000000000
d16 022b3f4840fed4e0  d17 4000000000000000
d18 0000000000000000  d19 0000000000000000
d20 0000000000000000  d21 3ff0000000000000
d22 4022000000000000  d23 3ff0000000000000
d24 0000000000000000  d25 3ff0000000000000
d26 0000000000000000  d27 c022000000000000
d28 0000000000000000  d29 3ff0000000000000
d30 3ff0000000000000  d31 be23e4f5df600000
scr 60000013
        #00  pc 00050846  /system/lib/libdvm.so (dvmAbort)
        #01  pc 000323cc  /system/lib/libdvm.so (_ZNK16IndirectRefTable3getEPv)
        #02  pc 00055376  /system/lib/libdvm.so (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
        #03  pc 00058c92  /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
code around pc:
4081e824 34b4f8d3 ee8cf7cd 26001e73 2f01f813  ...4....s..&.../
4081e834 42abb152 d0074416 4798e7f8 f7ff4c0a  R..B.D.....G.L..
4081e844 7026ffa7 ee82f7cd 2006490c 44794a0c  ..&p.....I. .JyD
4081e854 f7cd447a 2000ed38 edfaf7cd 58e54b05  zD..8.. .....K.X
4081e864 2b006c6b e7e9d1e9 deadd00d 00062794  kl.+.........'..
code around lr:
4081e824 34b4f8d3 ee8cf7cd 26001e73 2f01f813  ...4....s..&.../
4081e834 42abb152 d0074416 4798e7f8 f7ff4c0a  R..B.D.....G.L..
4081e844 7026ffa7 ee82f7cd 2006490c 44794a0c  ..&p.....I. .JyD
4081e854 f7cd447a 2000ed38 edfaf7cd 58e54b05  zD..8.. .....K.X
4081e864 2b006c6b e7e9d1e9 deadd00d 00062794  kl.+.........'..
memory map around addr deadd00d:
beae8000-beb09000 [stack]
(no map for address)
ffff0000-ffff1000 [vectors]
stack:
    4a74f9a0  00000000 
    4a74f9a4  4007ad69  /system/lib/libc.so
    4a74f9a8  400a470c  /system/lib/libc.so

...
...

4a74fc10  1d200366 
    4a74fc14  40823379  /system/lib/libdvm.so
debuggerd committing suicide to free the zombie!
Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
GC_FOR_ALLOC freed 588K, 11% free 9409K/10503K, paused 67ms
Grow heap (frag case) to 9.387MB for 87396-byte allocation
GC_FOR_ALLOC freed 41K, 12% free 9453K/10631K, paused 60ms
GC_FOR_ALLOC freed 85K, 12% free 9410K/10631K, paused 59ms
Grow heap (frag case) to 9.471MB for 174776-byte allocation
GC_FOR_ALLOC freed 0K, 12% free 9581K/10823K, paused 59ms
channel '412741f8 MuralShopping.Carteleria/MuralShopping.Carteleria.main (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
channel '412741f8 MuralShopping.Carteleria/MuralShopping.Carteleria.main (server)' ~ Channel is unrecoverably broken and will be disposed!
Process 1707 terminated by signal (11)
GC_FOR_ALLOC freed 170K, 13% free 9495K/10823K, paused 61ms
Attempted to unregister already unregistered input channel '412741f8 MuralShopping.Carteleria/MuralShopping.Carteleria.main (server)'
WIN DEATH: Window{412741f8 MuralShopping.Carteleria/MuralShopping.Carteleria.main paused=false}
Process MuralShopping.Carteleria (pid 1707) has died.
Scheduling restart of crashed service MuralShopping.Carteleria/.serviciocomunicacionservidor in 5000ms
Scheduling restart of crashed service MuralShopping.Carteleria/.servicioconfiguracionusb in 5000ms
Scheduling restart of crashed service MuralShopping.Carteleria/.servicioserversocketslaves in 5000ms
Scheduling restart of crashed service MuralShopping.Carteleria/.usbservicesensor in 5000ms
Force removing ActivityRecord{40fa1b48 MuralShopping.Carteleria/.main}: app died, no saved state
MediaPlayer.is not PlayingVideo
WIN DEATH: Window{412e5e98 MuralShopping.Carteleria/MuralShopping.Carteleria.main paused=false}
WINDOW DIED Window{412741f8 MuralShopping.Carteleria/MuralShopping.Carteleria.main paused=false}
Reconfiguring input devices.  changes=0x00000004
Device reconfigured: id=2, name='ft5x_ts', surface size is now 800x600, mode is 1
GC_FOR_ALLOC freed 41K, 12% free 9622K/10823K, paused 70ms
Grow heap (frag case) to 9.700MB for 196628-byte allocation
GC_FOR_ALLOC freed 133K, 13% free 9681K/11079K, paused 58ms
GC_FOR_ALLOC freed <1K, 13% free 9681K/11079K, paused 59ms
Grow heap (frag case) to 9.695MB for 131116-byte allocation
GC_FOR_ALLOC freed 0K, 13% free 9809K/11271K, paused 58ms
Config changed: {1.0 0mcc0mnc es_ES layoutdir=0 sw800dp w1066dp h752dp xlrg land finger -keyb/v/h -nav/h s.7}
Resizing status bar plugged=false height=36 old=36
debuggerd: Dec 11 2012 22:03:03
Sending signal. PID: 912 SIG: 3
threadid=3: reacting to signal 3
Wrote stack traces to '/data/anr/traces.txt'
setLightsOn(true)
 

enrico

Active Member
Licensed User
Longtime User
I had this problem too, testing two of my apps in B4A 3.82.
I think I didn't have it with previous versions of B4A.
They use Timer to display a splashscreen with this code :

B4X:
        Timer1.Initialize("Timer1", 4000)
        Timer1.Enabled = True

B4X:
Sub Timer1_tick
    pnlSplashScreen.Visible = False
    Timer1.Enabled = False   
    pnlMainMenu.Enabled = True   
    pnlMainMenu.Visible = True
End Sub

With the Android 2.3.3 emulator, the apps close by themself after about 5 seconds from the start.
With the Android 4.0.3 emulator, the apps work.
With an Android 2.3.3 real device, the apps work.

Another app with similar splashscreen use, but that calls StartActivity at the end of the Timer1_tick sub, seems to work with Android 2.3.3 emulator too.
 
Upvote 0
Top