Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7971] Android - TableViewRow containing View crashes app on click

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-05-02T16:03:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labels2.0.0, android, click, qe-testadded, tableview, tableviewrow
ReporterJustin Toth
AssigneeMarshall Culpepper
Created2012-02-18T10:18:32.000+0000
Updated2012-05-02T16:03:02.000+0000

Description

When clicking on a tableview row that has a view within the row, eventually it will crash all windows and exit the app. It occurs on a Samsung Galaxy Tab running Android 3.2. It does not occur in the Android 2.2 Emulator or on my Droid X2 running Android 2.3.4. Below is the code to reproduce. Click on the rows repeatedly for a while and eventually it will crash the app and either go back to the home screen or relaunch the app. Sometimes it happens on the first click, sometimes it takes 100+ clicks. Clicking faster makes it easier to reproduce, however it isn't a requirement.
var win = Ti.UI.createWindow({ backgroundColor: "#fff", title: "window 1", exitOnClose: true, 
	navBarHidden: true, index: 0 });
	
win.add(Ti.UI.createLabel({ text: 'window #1', top: 10 }));

var rows = [];
for(var k=0;k<10;k++) {
	var row = Ti.UI.createTableViewRow({ height: 60 });
	var view = Ti.UI.createView({ top: 0, bottom: 5, left: 0, right: 0, backgroundColor: "blue" });
    row.add(view);
	rows[k] = row;
}

var table = Ti.UI.createTableView({ top: 60, bottom: 10, left: 0, right: 0, data: rows });
table.addEventListener("click", function() { Ti.API.info("clicking tableviewrow!"); });
win.add(table);
	
win.open();
Here is the error:
I/InputReader(  312): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel 'TouchIntercepter (server)'
W/dalvikvm( 2121): JNI WARNING: DeleteLocalRef(0x40a25938) failed to find entry (valid=1)
E/JNIUtil ( 2121): !!! Unable to convert unknown Java object class 'java.lang.Class' to Js value !!!
W/dalvikvm( 2121): JNI WARNING: DeleteLocalRef(0x40a25bd0) failed to find entry (valid=1)
E/JNIUtil ( 2121): !!! Unable to convert unknown Java object class 'java.lang.Class' to Js value !!!
W/dalvikvm( 2121): JNI WARNING: DeleteLocalRef(0x409b9e90) failed to find entry (valid=1)
I/AudioFlinger(  240): start output streamType (0, 1) for 1
I/DEBUG   ( 8442): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 8442): Build fingerprint: 'samsung/GT-P7510/GT-P7510:3.2/HTJ85B/UEKMP:user/release-keys'
I/DEBUG   ( 8442): pid: 2121, tid: 2130  >>> com.navtrak.driver <<<
I/DEBUG   ( 8442): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG   ( 8442):  r0 00000001  r1 00000001  r2 00000000  r3 58f5f921
I/DEBUG   ( 8442):  r4 001aeeb8  r5 001d3bf8  r6 001d2c0c  r7 001d2ce0
I/DEBUG   ( 8442):  r8 00000003  r9 00000000  10 001d3bf8  fp 00000000
I/DEBUG   ( 8442):  ip 81c9b738  sp 5c3dca28  lr 81a910b4  pc 81a910ec  cpsr 20000010
I/DEBUG   ( 8442):  d0  41d64a43b2000000  d1  58cda05558cda071
I/DEBUG   ( 8442):  d2  3ff0000000000000  d3  4197d78400000000
I/DEBUG   ( 8442):  d4  3ff0000000000000  d5  0000000000000000
I/DEBUG   ( 8442):  d6  0000001a00000000  d7  0000001a00000000
I/DEBUG   ( 8442):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 8442):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 8442):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 8442):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 8442):  scr 60000013
I/DEBUG   ( 8442): 
I/AudioFlinger(  240): stop output streamType (0, 1) for 1
I/InputReader(  312): dispatchTouch::touch event's action is 0, pending(waiting finished signal)=0
I/InputDispatcher(  312): Delivering touch to current input target: action: 0, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher(  312): Delivering touch to current input target: action: 0, channel 'TouchIntercepter (server)'
I/InputReader(  312): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel 'TouchIntercepter (server)'
I/AudioFlinger(  240): start output streamType (0, 1) for 1
I/DEBUG   ( 8442):          #00  pc 81a910ec  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):          #01  lr 81a910b4  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442): 
I/DEBUG   ( 8442): libc base address: aff00000
I/DEBUG   ( 8442): 
I/DEBUG   ( 8442): code around pc:
I/DEBUG   ( 8442): 81a910cc e58485c0 0a000002 e58455bc e1a00004 
I/DEBUG   ( 8442): 81a910dc ebfbd2fe e1a00006 e28dd024 e8bd8ff0 
I/DEBUG   ( 8442): 81a910ec e5993000 e3130001 1a000033 e1b020c3 
I/DEBUG   ( 8442): 81a910fc 4a00009f e5963000 e58d2018 e2031003 
I/DEBUG   ( 8442): 81a9110c e3510001 0a00007b e59d3048 e3130007 
I/DEBUG   ( 8442): 
I/DEBUG   ( 8442): code around lr:
I/DEBUG   ( 8442): 81a91094 e24dd024 e1a09002 e1a0b003 e58485c0 
I/DEBUG   ( 8442): 81a910a4 e59475b8 e1a0500a 0a000028 ebfa14ac 
I/DEBUG   ( 8442): 81a910b4 e3500000 1a00000b e59b6000 e2488001 
I/DEBUG   ( 8442): 81a910c4 e155000a e58475b8 e58485c0 0a000002 
I/DEBUG   ( 8442): 81a910d4 e58455bc e1a00004 ebfbd2fe e1a00006 
I/DEBUG   ( 8442): 
I/DEBUG   ( 8442): stack:
I/DEBUG   ( 8442):     5c3dc9e8  0023fb08  
I/DEBUG   ( 8442):     5c3dc9ec  0000000f  
I/DEBUG   ( 8442):     5c3dc9f0  0023fb10  
I/DEBUG   ( 8442):     5c3dc9f4  0000c024  
I/DEBUG   ( 8442):     5c3dc9f8  81bfe9c8  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dc9fc  81c9b660  
I/DEBUG   ( 8442):     5c3dca00  4099e9b0  
I/DEBUG   ( 8442):     5c3dca04  aff13393  /system/lib/libc.so
I/DEBUG   ( 8442):     5c3dca08  001935a0  
I/DEBUG   ( 8442):     5c3dca0c  59074388  
I/DEBUG   ( 8442):     5c3dca10  401ac310  
I/DEBUG   ( 8442):     5c3dca14  001935a0  
I/DEBUG   ( 8442):     5c3dca18  00117c68  
I/DEBUG   ( 8442):     5c3dca1c  401ac310  
I/DEBUG   ( 8442):     5c3dca20  df002777  
I/DEBUG   ( 8442):     5c3dca24  e3a070ad  
I/DEBUG   ( 8442):     5c3dca28  0000c024  
I/DEBUG   ( 8442):     5c3dca2c  00000001  
I/DEBUG   ( 8442):     5c3dca30  0023fb10  
I/DEBUG   ( 8442):     5c3dca34  162d37ee  
I/DEBUG   ( 8442):     5c3dca38  81bfe9c8  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dca3c  409b9e90  
I/DEBUG   ( 8442):     5c3dca40  00117c68  
I/DEBUG   ( 8442):     5c3dca44  409b9e90  
I/DEBUG   ( 8442):     5c3dca48  00000001  
I/DEBUG   ( 8442):     5c3dca4c  81c9b660  
I/DEBUG   ( 8442):     5c3dca50  001aeeb8  
I/DEBUG   ( 8442):     5c3dca54  00000000  
I/DEBUG   ( 8442):     5c3dca58  001d2c0c  
I/DEBUG   ( 8442):     5c3dca5c  00000000  
I/DEBUG   ( 8442):     5c3dca60  00001c34  
I/DEBUG   ( 8442):     5c3dca64  00000000  
I/DEBUG   ( 8442):     5c3dca68  00000000  
I/DEBUG   ( 8442):     5c3dca6c  81986088  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dca70  00000000  
I/DEBUG   ( 8442):     5c3dca74  00000000  
I/DEBUG   ( 8442):     5c3dca78  001935a0  
I/DEBUG   ( 8442):     5c3dca7c  401ac310  
I/DEBUG   ( 8442):     5c3dca80  00117c68  
I/DEBUG   ( 8442):     5c3dca84  001aeeb8  
I/DEBUG   ( 8442):     5c3dca88  001aef10  
I/DEBUG   ( 8442):     5c3dca8c  001d3bf8  
I/DEBUG   ( 8442):     5c3dca90  001d2ce0  
I/DEBUG   ( 8442):     5c3dca94  00000000  
I/DEBUG   ( 8442):     5c3dca98  00000004  
I/DEBUG   ( 8442):     5c3dca9c  00000000  
I/DEBUG   ( 8442):     5c3dcaa0  409b9e38  
I/DEBUG   ( 8442):     5c3dcaa4  8191a438  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dcaa8  00000000  
I/DEBUG   ( 8442):     5c3dcaac  00117c68  
I/DEBUG   ( 8442):     5c3dcab0  00117c68  
I/DEBUG   ( 8442):     5c3dcab4  402e9560  
I/DEBUG   ( 8442):     5c3dcab8  402e9560  
I/DEBUG   ( 8442):     5c3dcabc  00000003  
I/DEBUG   ( 8442):     5c3dcac0  00000000  
I/DEBUG   ( 8442):     5c3dcac4  81c9b660  
I/DEBUG   ( 8442):     5c3dcac8  4099e9b0  
I/DEBUG   ( 8442):     5c3dcacc  8186ec09  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dcad0  001aeeb8  
I/DEBUG   ( 8442):     5c3dcad4  001d2c0c  
I/DEBUG   ( 8442):     5c3dcad8  409b9e38  
I/DEBUG   ( 8442):     5c3dcadc  00001db0  
I/DEBUG   ( 8442):     5c3dcae0  0019fc38  
I/DEBUG   ( 8442):     5c3dcae4  81c9b660  
I/DEBUG   ( 8442):     5c3dcae8  5c3dcb28  
I/DEBUG   ( 8442):     5c3dcaec  0000129c  
I/DEBUG   ( 8442):     5c3dcaf0  5c3dcb14  
I/DEBUG   ( 8442):     5c3dcaf4  00000000  
I/DEBUG   ( 8442):     5c3dcaf8  00000001  
I/DEBUG   ( 8442):     5c3dcafc  001e6438  
I/DEBUG   ( 8442):     5c3dcb00  001d2c00  
I/DEBUG   ( 8442):     5c3dcb04  8186f113  /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG   ( 8442):     5c3dcb08  00000000  
I/DEBUG   ( 8442):     5c3dcb0c  001d2c04  
I/DEBUG   ( 8442):     5c3dcb10  00000000  
I/DEBUG   ( 8442):     5c3dcb14  ca634e53  
I/DEBUG   ( 8442):     5c3dcb18  000314d9  
I/DEBUG   ( 8442):     5c3dcb1c  5c3dcb70  
I/DEBUG   ( 8442):     5c3dcb20  40197f34  
I/DEBUG   ( 8442):     5c3dcb24  40197f20  
I/DEBUG   ( 8442):     5c3dcb28  001aeeb8  
I/DEBUG   ( 8442):     5c3dcb2c  00000000  
I/AudioFlinger(  240): stop output streamType (0, 1) for 1
I/InputReader(  312): dispatchTouch::touch event's action is 0, pending(waiting finished signal)=0
I/InputDispatcher(  312): Delivering touch to current input target: action: 0, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher(  312): Delivering touch to current input target: action: 0, channel 'TouchIntercepter (server)'
I/InputReader(  312): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher(  312): Delivering touch to current input target: action: 1, channel 'TouchIntercepter (server)'
I/AudioFlinger(  240): start output streamType (0, 1) for 1
I/DEBUG   ( 8442): dumpstate /data/log/dumpstate_app_native.txt
I/BootReceiver(  312): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
I/dumpstate( 2321): begin
I/AudioFlinger(  240): stop output streamType (0, 1) for 1
I/alsa_mixer(  240): mixer_close
I/AudioHardware(  240): closePcmOut_l() mPcmOpenCnt: 1
I/wpa_supplicant(  642): CTRL-EVENT-STATE-CHANGE id=1 state=6 BSSID=00:00:00:00:00:00
I/wpa_supplicant(  642): WPA: Group rekeying completed with 1c:af:f7:db:64:03 [GTK=CCMP]
I/wpa_supplicant(  642): CTRL-EVENT-STATE-CHANGE id=1 state=7 BSSID=00:00:00:00:00:00
W/PowerManagerService(  312): Timer 0x3->0x3|0x0
I/dumpstate( 2321): done
E/InputDispatcher(  312): channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
E/InputDispatcher(  312): channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowManager(  312): WINDOW DIED Window{4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity paused=false}
I/SurfaceFlinger(  237): id=4691 Removed com.navtrak.driver/com.navtrak.driver.DriverActivity idx=2 Map Size=2
I/ActivityManager(  312): Process com.navtrak.driver (pid 2121) has died.
I/SurfaceFlinger(  237): id=4691 Removed com.navtrak.driver/com.navtrak.driver.DriverActivity idx=-2 Map Size=2
W/WindowManager(  312): Failed looking up window
W/WindowManager(  312): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@427544b8 does not exist
W/WindowManager(  312): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7120)
W/WindowManager(  312): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7111)
W/WindowManager(  312): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1400)
W/WindowManager(  312): at android.os.BinderProxy.sendDeathNotice(Binder.java:418)
W/WindowManager(  312): at dalvik.system.NativeStart.run(Native Method)
I/WindowManager(  312): WIN DEATH: null
Here is the full log - [https://gist.github.com/1860367]

Comments

  1. Matt Voysey 2012-03-13

    I can confirm this issue occurs identically as described with an ASUS Transformer TF101 tablet running Android 4.0.3, and using Titanium Mobile SDK 1.8.2.
  2. Dawson Toth 2012-03-13

    I have reproduced this issue on my Samsung Galaxy Tab 7.0 Plus. I altered the example code a little bit to the below so that it is very easy to see when the app crashes:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff',
           title: 'Window #1',
           exitOnClose: true,
           navBarHidden: true,
           index: 0
       });
       
       var clickCount = 0;
       var label = Ti.UI.createLabel({ text: 'Clicked ' + clickCount + ' Times', top: 10 });
       win.add(label);
       
       var rows = [];
       for (var k = 0; k < 10; k++) {
           var row = Ti.UI.createTableViewRow({ height: 60 });
           var view = Ti.UI.createView({ top: 0, bottom: 5, left: 0, right: 0, backgroundColor: 'blue' });
           row.add(view);
           rows[k] = row;
       }
       
       var table = Ti.UI.createTableView({ top: 60, bottom: 10, left: 0, right: 0, data: rows });
       table.addEventListener('click', function () {
           label.text = 'Clicked ' + (++clickCount) + ' Times';
           Ti.API.info('clicking tableviewrow!');
       });
       win.add(table);
       
       win.open();
       
    On my Galaxy Tab 7.0 Plus (Android 3.2), it crashes around 30-50 clicks on the table view every time. On my EPIC 4G (Android 2.3.7), I got to 200 clicks before giving up.
  3. Matt Voysey 2012-03-14

    Possible workaround: The TableViewRow in my app contained a single child View (set to layout: "vertical"), which itself contained multiple child Views (a stack of Labels in fact). In this situation the app was crashing on average after only around 10 clicks. Now the TableViewRow in fact supports the same "layout" property as Ti.UI.View, so I tried instead adding the multiple child labels directly to the TableViewRow itself. Now, so far, the crash has not re-occurred...
  4. Ivan Skugor 2012-03-14

    Yeah, I noticed this issue (and other weird things) a long time ago. The best is to avoid using View inside TableViewRow. That is not so problematic since TableViewRow is a special kind of View and can do (almost) everything that View can.
  5. Justin Toth 2012-04-20

    I think this issue might be resolved in 2.0.1.GA2 and above. I haven't been able to reproduce the crash ever since upgrading.
  6. Dustin Hyde 2012-04-23

    Unable to reproduce the crash after 1000 clicks using Dawson's code. SDK: 2.0.2.v20120418121806 Studio: 2.0.2.201204201120 OS: Snow Leopard Devices Tested: Galaxy Tab 10.1 3.2
  7. Michael Pettiford 2012-05-02

    Reopening to add/remove labels

JSON Source