[TIMOB-7985] Android: KitchenSink silent crash on exit when using the Geolocation test
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-18T19:08:38.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | Android |
Labels | regression |
Reporter | Marshall Culpepper |
Assignee | Josh Roesslein |
Created | 2012-03-13T20:09:41.000+0000 |
Updated | 2012-03-19T14:45:28.000+0000 |
Description
In KitchenSink, go to:
Phone tab > Geolocation
Back out until you exit the application, then wait a few seconds and you should see an NDK crash in logcat. Note that this crash isn't reported to the user.
E/TiBaseActivity(32310): (main) [877,53358] Layout cleanup.
E/TiBaseActivity(32310): (main) [4,53362] Layout cleanup.
E/TiBaseActivity(32310): (main) [12,53374] Layout cleanup.
W/ActivityManager( 193): Scheduling restart of crashed service mobi.infolife.taskmanager/.TaskManagerService in 5000ms
F/libc (32310): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I/DEBUG (32048): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (32048): Build fingerprint: 'google/mysid/toro:4.0.2/ICL53F/235179:user/release-keys'
I/DEBUG (32048): pid: 32310, tid: 32325 >>> com.appcelerator.titanium <<<
I/DEBUG (32048): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG (32048): r0 00000001 r1 00000002 r2 000000a3 r3 3d1bc889
I/DEBUG (32048): r4 00230098 r5 001a4f58 r6 0026fcb0 r7 001a3f64
I/DEBUG (32048): r8 00000000 r9 00000000 10 00000000 fp 419c5c58
I/DEBUG (32048): ip 5bbaa028 sp 5b5c7b10 lr 5b8951b8 pc 5b9939cc cpsr 20000010
I/DEBUG (32048): d0 3edc4491398ab1b9 d1 3edc2c5d3edc2136
I/DEBUG (32048): d2 3edc15013edc35dc d3 3edbf7493edc403e
I/DEBUG (32048): d4 3edc3be13edc4551 d5 3edc16b93edc38f5
I/DEBUG (32048): d6 3edc46053edc42a1 d7 5afa41855afa32f1
I/DEBUG (32048): d8 0000000000000000 d9 0000000000000000
I/DEBUG (32048): d10 0000000000000000 d11 0000000000000000
I/DEBUG (32048): d12 0000000000000000 d13 0000000000000000
I/DEBUG (32048): d14 0000000000000000 d15 0000000000000000
I/DEBUG (32048): d16 0000000041944020 d17 7e37e43c8800759c
I/DEBUG (32048): d18 4028000000000000 d19 3ff0000000000000
I/DEBUG (32048): d20 4197d78400000000 d21 3e9a60adbb7363f4
I/DEBUG (32048): d22 3e21ee9eae4330bd d23 bda8fae9be8838d4
I/DEBUG (32048): d24 bfb3b18f18e817d3 d25 3fb10dec1052c1bd
I/DEBUG (32048): d26 bfaddef1342d83e3 d27 3fa97ba2774cf6f6
I/DEBUG (32048): d28 bfa2b4442c6a6c2f d29 0100010001000100
I/DEBUG (32048): d30 0001000000010000 d31 0001000000010000
I/DEBUG (32048): scr 60000012
I/DEBUG (32048):
I/DEBUG (32048): #00 pc 5b9939cc /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): #01 lr 5b8951b8 /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048):
I/DEBUG (32048): code around pc:
I/DEBUG (32048): 5b9939ac e2811001 e3500001 e24dd030 e58415c0
I/DEBUG (32048): 5b9939bc e1a08002 e59475b8 e59455bc 0a000032
I/DEBUG (32048): 5b9939cc e5983000 e3130001 1a000014 e1b0a0c3
I/DEBUG (32048): 5b9939dc 4a000050 e1a01006 e1a0200a e1a00004
I/DEBUG (32048): 5b9939ec e58da028 ebffbe90 e1a06000 e59435c0
I/DEBUG (32048):
I/DEBUG (32048): code around lr:
I/DEBUG (32048): 5b895198 e1a07000 e5930000 e1a06001 eb02efbf
I/DEBUG (32048): 5b8951a8 e1a01007 e1a02006 e1a05000 eb03f9f6
I/DEBUG (32048): 5b8951b8 e2003003 e3530003 e1a09000 0a000007
I/DEBUG (32048): 5b8951c8 e59505b8 e59535bc e1500003 0a000048
I/DEBUG (32048): 5b8951d8 e2803004 e58535b8 e5809000 e8bd87f0
I/DEBUG (32048):
I/DEBUG (32048): stack:
I/DEBUG (32048): 5b5c7ad0 5b5c7ae8
I/DEBUG (32048): 5b5c7ad4 00000001
I/DEBUG (32048): 5b5c7ad8 000a8338
I/DEBUG (32048): 5b5c7adc 00000004
I/DEBUG (32048): 5b5c7ae0 00002468
I/DEBUG (32048): 5b5c7ae4 5b8ac358 /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): 5b5c7ae8 00000000
I/DEBUG (32048): 5b5c7aec 00000000
I/DEBUG (32048): 5b5c7af0 00000000
I/DEBUG (32048): 5b5c7af4 00000001
I/DEBUG (32048): 5b5c7af8 00000021
I/DEBUG (32048): 5b5c7afc 0000000e
I/DEBUG (32048): 5b5c7b00 00000001
I/DEBUG (32048): 5b5c7b04 00000000
I/DEBUG (32048): 5b5c7b08 df0027ad
I/DEBUG (32048): 5b5c7b0c 00000000
I/DEBUG (32048): 5b5c7b10 41a0e100
I/DEBUG (32048): 5b5c7b14 0000000e
I/DEBUG (32048): 5b5c7b18 00000007
I/DEBUG (32048): 5b5c7b1c 5b8a1bd4 /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): 5b5c7b20 41a0e100
I/DEBUG (32048): 5b5c7b24 00000007
I/DEBUG (32048): 5b5c7b28 5b5c7b40
I/DEBUG (32048): 5b5c7b2c 00230098
I/DEBUG (32048): 5b5c7b30 4088efc0
I/DEBUG (32048): 5b5c7b34 41a0e0f0
I/DEBUG (32048): 5b5c7b38 4088ec58
I/DEBUG (32048): 5b5c7b3c 001a3f60
I/DEBUG (32048): 5b5c7b40 5bba9f50
I/DEBUG (32048): 5b5c7b44 00230098
I/DEBUG (32048): 5b5c7b48 00000000
I/DEBUG (32048): 5b5c7b4c 0026fcb0
I/DEBUG (32048): 5b5c7b50 00001c54
I/DEBUG (32048): 5b5c7b54 00000000
I/DEBUG (32048): 5b5c7b58 00000000
I/DEBUG (32048): 5b5c7b5c 5b8951b8 /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): 5b5c7b60 00230098
I/DEBUG (32048): 5b5c7b64 002300f0
I/DEBUG (32048): 5b5c7b68 0026fcb0
I/DEBUG (32048): 5b5c7b6c 00000000
I/DEBUG (32048): 5b5c7b70 00000004
I/DEBUG (32048): 5b5c7b74 00000000
I/DEBUG (32048): 5b5c7b78 00000000
I/DEBUG (32048): 5b5c7b7c 5b81ed00 /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): 5b5c7b80 5bba9f50
I/DEBUG (32048): 5b5c7b84 000012b4
I/DEBUG (32048): 5b5c7b88 0026fcb0
I/DEBUG (32048): 5b5c7b8c 5b5c7bb8
I/DEBUG (32048): 5b5c7b90 0026fcb0
I/DEBUG (32048): 5b5c7b94 5b77798b /data/data/com.appcelerator.titanium/lib/libkroll-v8.so
I/DEBUG (32048): 5b5c7b98 000012b4
I/DEBUG (32048): 5b5c7b9c 001a3f60
I/DEBUG (32048): 5b5c7ba0 00000000
I/DEBUG (32048): 5b5c7ba4 3d8f82c0
I/DEBUG (32048): 5b5c7ba8 0000ee40
I/DEBUG (32048): 5b5c7bac 5b5c7c00
I/DEBUG (32048): 5b5c7bb0 56cadf0c
I/DEBUG (32048): 5b5c7bb4 001df1e8
I/DEBUG (32048): 5b5c7bb8 00230098
I/DEBUG (32048): 5b5c7bbc 00000000
I/DEBUG (32048): 5b5c7bc0 00000000
I/DEBUG (32048): 5b5c7bc4 56cadf00
I/DEBUG (32048): 5b5c7bc8 00000003
I/DEBUG (32048): 5b5c7bcc 56cadf14
I/DEBUG (32048): 5b5c7bd0 5b5c7c00
I/DEBUG (32048): 5b5c7bd4 5b5c7c00
I/DEBUG (32048): 5b5c7bd8 56cade68
I/DEBUG (32048): 5b5c7bdc 001df1e8
I/DEBUG (32048): 5b5c7be0 5b5c7c14
I/DEBUG (32048): 5b5c7be4 56fa4da0
I/DEBUG (32048): 5b5c7be8 56cade64
I/DEBUG (32048): 5b5c7bec 00000007
I/DEBUG (32048): 5b5c7bf0 56cade78
I/DEBUG (32048): 5b5c7bf4 407f5c74 /system/lib/libdvm.so
I/DEBUG (32048): 5b5c7bf8 41a0e0d0
I/DEBUG (32048): 5b5c7bfc 419b7110
I/DEBUG (32048): 5b5c7c00 001df1d8
I/DEBUG (32048): 5b5c7c04 00000000
I/DEBUG (32048): 5b5c7c08 001be578
I/DEBUG (32048): 5b5c7c0c 419c5c58
I/DEBUG (32048): 5b5c7c10 00000001
I/DEBUG (32048): 5b5c7c14 4083006d /system/lib/libdvm.so
I/BootReceiver( 193): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
I/DEBUG (32048): debuggerd committing suicide to free the zombie!
D/Zygote ( 116): Process 32310 terminated by signal (11)
I/ActivityManager( 193): Process com.appcelerator.titanium (pid 32310) has died.
I/DEBUG (32361): debuggerd: Dec 8 2011 00:55:26
This crash appears to be caused by a sensor event ('heading') that is being fired after the runtime has been disposed. While we do register for the destroy event on the current activity this doesn't appear to stop the sensor in time. This is probably due to sensor events being dispatched from their own thread onto the runtime thread message queue. So while we fire a synchronous event "destroy" for the activity on the UI thread, this won't stop the sensor thread from pushing new messages onto the runtime queue in the mean time. We may need a way to halt sensors before we start the disposal of the runtime. Also we need to be careful in other parts of the platform to always "stop" event sources when a disposal is about to begin. So a more general API to register a callback for "dispose" may be the best solution.
Sent [Pull Request #1690](https://github.com/appcelerator/titanium_mobile/pull/1690) to address this issue.
I'm still seeing a hard crash after Geo, here's another log (looks like this might be related to the reverse geo event)
Tested with Nexus Galaxy 4.0.2 using 2.0.0.v20120319003254 with v8/rhino