Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10251

Android: Application crashes when consecutively opening and closing app.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: Release 2.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      Description

      Problem

      When opening and closing the application repeatedly, eventually around the 4th or 5th time, the application crashes on opening.

      Test Code:

       
      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      // create tab group
      var tabGroup = Titanium.UI.createTabGroup();
       
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      var tab1 = Titanium.UI.createTab({  
          icon:'KS_nav_views.png',
          title:'Tab 1',
          window:win1
      });
       
      var label1 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 1',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      win1.add(label1);
       
      //
      // create controls tab and root window
      //
      var win2 = Titanium.UI.createWindow({  
          title:'Tab 2',
          backgroundColor:'#fff'
      });
      var tab2 = Titanium.UI.createTab({  
          icon:'KS_nav_ui.png',
          title:'Tab 2',
          window:win2
      });
       
      var label2 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 2',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      win2.add(label2);
       
       
       
      //
      //  add tabs
      //
      tabGroup.addTab(tab1);  
      tabGroup.addTab(tab2);  
       
       
      // open tab group
      tabGroup.open();
      
      

      Test Case:

      1. Launch the application
      2. Close the application
      3. Repeat steps 1-2

      Expected Behavior:

      The application should get launched everytime.

      Actual Behavior:

      After sometime the application will crash by providing a JNI crash log in ADB.

      I/DEBUG ( 5218): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
      I/DEBUG ( 5218): Build fingerprint: 'samsung/GT-I9100/GT-I9100:4.0.3/IML74K/XXLPQ:user/release-keys'
      I/DEBUG ( 5218): pid: 23387, tid: 23401 >>> com.example.TestMe <<<
      I/DEBUG ( 5218): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000013
      I/DEBUG ( 5218): r0 00000000 r1 00000000 r2 00000004 r3 510a5d40
      I/DEBUG ( 5218): r4 0010a358 r5 00000004 r6 416f8310 r7 001f0330
      I/DEBUG ( 5218): r8 4154c248 r9 416f8310 10 001f0328 fp 00000000
      I/DEBUG ( 5218): ip 510a5e28 sp 50b6dae0 lr 50c9ce74 pc 50cbc318 cpsr 60000010
      I/DEBUG ( 5218): d0 0000000000000000 d1 0000006443b1d556
      I/DEBUG ( 5218): d2 437e8000000f4240 d3 3ff0000000000000
      I/DEBUG ( 5218): d4 3ff0000000000000 d5 0006ea0000000000
      I/DEBUG ( 5218): d6 008e0ff000000000 d7 3eaaaaab3f800000
      I/DEBUG ( 5218): d8 0000000000000000 d9 0000000000000000
      I/DEBUG ( 5218): d10 0000000000000000 d11 0000000000000000
      I/DEBUG ( 5218): d12 0000000000000000 d13 0000000000000000
      I/DEBUG ( 5218): d14 0000000000000000 d15 0000000000000000
      I/DEBUG ( 5218): d16 0000000041553b80 d17 3ff0000000000000
      I/DEBUG ( 5218): d18 4028000000000000 d19 3ff0000000000000
      I/DEBUG ( 5218): d20 4197d78400000000 d21 bebbbc6c1a570a20
      I/DEBUG ( 5218): d22 3ff0000000000000 d23 3fede16b9c24a98f
      I/DEBUG ( 5218): d24 3e66376972bea4d0 d25 3fc39a09d078c69f
      I/DEBUG ( 5218): d26 0000000000000000 d27 0000000000000000
      I/DEBUG ( 5218): d28 0000000000000000 d29 0000000000000000
      I/DEBUG ( 5218): d30 0000000000000000 d31 0000000000000000
      I/DEBUG ( 5218): scr 80000012
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): #00 pc 0014e318 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): #01 lr 50c9ce74 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): code around pc:
      I/DEBUG ( 5218): 50cbc2f8 e2003003 e3530001 112fff1e e5103001 .0....S.../..0..
      I/DEBUG ( 5218): 50cbc308 e5d33007 e35300ac 0590000b e12fff1e .0....S......./.
      I/DEBUG ( 5218): 50cbc318 e5903013 e2032003 e3520001 1a000002 .0... ....R.....
      I/DEBUG ( 5218): 50cbc328 ea00000c e5903007 e5930017 e2003003 .....0.......0..
      I/DEBUG ( 5218): 50cbc338 e3530001 1afffffa e1a03a20 e1a03a03 ..S..... :...:..
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): code around lr:
      I/DEBUG ( 5218): 50c9ce54 e08f1001 eb03d11b e3a01003 e1a00004 ................
      I/DEBUG ( 5218): 50c9ce64 e5945a3c ebffbce0 e59409fc eb007d28 <Z..........(}..
      I/DEBUG ( 5218): 50c9ce74 e590705b e1a03a27 e1a03a03 e5936024 [p..':...:..$`..
      I/DEBUG ( 5218): 50c9ce84 e2466058 e5961a74 e5963a78 e1510003 X`F.t...x:....Q.
      I/DEBUG ( 5218): 50c9ce94 0a000014 e2813004 e5863a74 e5817000 .....0..t:...p..
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): stack:
      I/DEBUG ( 5218): 50b6daa0 001f3420 [heap]
      I/DEBUG ( 5218): 50b6daa4 50b6dac0
      I/DEBUG ( 5218): 50b6daa8 0010a358 [heap]
      I/DEBUG ( 5218): 50b6daac 0010a3b0 [heap]
      I/DEBUG ( 5218): 50b6dab0 00000000
      I/DEBUG ( 5218): 50b6dab4 50cf3cf4 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50b6dab8 00000001
      I/DEBUG ( 5218): 50b6dabc 409a9c78 /system/lib/libdvm.so
      I/DEBUG ( 5218): 50b6dac0 409a9fd8 /system/lib/libdvm.so
      I/DEBUG ( 5218): 50b6dac4 41553ba0 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6dac8 0010a358 [heap]
      I/DEBUG ( 5218): 50b6dacc 00000004
      I/DEBUG ( 5218): 50b6dad0 416f8310 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6dad4 001f0330 [heap]
      I/DEBUG ( 5218): 50b6dad8 df0027ad
      I/DEBUG ( 5218): 50b6dadc 00000000
      I/DEBUG ( 5218): #00 50b6dae0 0019ea60 [heap]
      I/DEBUG ( 5218): 50b6dae4 510a5d40 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50b6dae8 416f8310 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6daec 001f0330 [heap]
      I/DEBUG ( 5218): 50b6daf0 4154c248 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6daf4 50bdbe05 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50b6daf8 001f0330 [heap]
      I/DEBUG ( 5218): 50b6dafc 4154c248 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6db00 4154c248 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6db04 416f8310 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6db08 001f0328 [heap]
      I/DEBUG ( 5218): 50b6db0c 0019ea60 [heap]
      I/DEBUG ( 5218): 50b6db10 41553b80 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50b6db14 50b6db3c
      I/DEBUG ( 5218): 50b6db18 001f0330 [heap]
      I/DEBUG ( 5218): 50b6db1c 50bdeceb /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50b6db20 00000000
      I/DEBUG ( 5218): 50b6db24 000147c0 [heap]
      I/DEBUG ( 5218): dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_native -m 23387
      I/DEBUG ( 5218): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
      I/DEBUG ( 5218): Build fingerprint: 'samsung/GT-I9100/GT-I9100:4.0.3/IML74K/XXLPQ:user/release-keys'
      I/DEBUG ( 5218): pid: 23665, tid: 23679 >>> com.example.TestMe <<<
      I/DEBUG ( 5218): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000013
      I/DEBUG ( 5218): r0 00000000 r1 00000000 r2 00000004 r3 5120fd40
      I/DEBUG ( 5218): r4 00231790 r5 00000004 r6 416d76f0 r7 00261fe8
      I/DEBUG ( 5218): r8 41728140 r9 416d76f0 10 00261fe0 fp 00000000
      I/DEBUG ( 5218): ip 5120fe28 sp 50bd7ae0 lr 50e06e74 pc 50e26318 cpsr 60000010
      I/DEBUG ( 5218): d0 0000000000000000 d1 0000006443b1d556
      I/DEBUG ( 5218): d2 437e8000000f4240 d3 3ff0000000000000
      I/DEBUG ( 5218): d4 3ff0000000000000 d5 0006ea0000000000
      I/DEBUG ( 5218): d6 008e0ff000000000 d7 3eaaaaab3f800000
      I/DEBUG ( 5218): d8 0000000000000000 d9 0000000000000000
      I/DEBUG ( 5218): d10 0000000000000000 d11 0000000000000000
      I/DEBUG ( 5218): d12 0000000000000000 d13 0000000000000000
      I/DEBUG ( 5218): d14 0000000000000000 d15 0000000000000000
      I/DEBUG ( 5218): d16 0000000041503f38 d17 43e0000000000000
      I/DEBUG ( 5218): d18 4028000000000000 d19 3ff0000000000000
      I/DEBUG ( 5218): d20 4197d78400000000 d21 bebbbc6c1a570a20
      I/DEBUG ( 5218): d22 3ff0000000000000 d23 3fede16b9c24a98f
      I/DEBUG ( 5218): d24 3e66376972bea4d0 d25 3fc39a09d078c69f
      I/DEBUG ( 5218): d26 0000000000000000 d27 0000000000000000
      I/DEBUG ( 5218): d28 0000000000000000 d29 0000000000000000
      I/DEBUG ( 5218): d30 0000000000000000 d31 0000000000000000
      I/DEBUG ( 5218): scr 80000012
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): #00 pc 0014e318 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): #01 lr 50e06e74 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): code around pc:
      I/DEBUG ( 5218): 50e262f8 e2003003 e3530001 112fff1e e5103001 .0....S.../..0..
      I/DEBUG ( 5218): 50e26308 e5d33007 e35300ac 0590000b e12fff1e .0....S......./.
      I/DEBUG ( 5218): 50e26318 e5903013 e2032003 e3520001 1a000002 .0... ....R.....
      I/DEBUG ( 5218): 50e26328 ea00000c e5903007 e5930017 e2003003 .....0.......0..
      I/DEBUG ( 5218): 50e26338 e3530001 1afffffa e1a03a20 e1a03a03 ..S..... :...:..
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): code around lr:
      I/DEBUG ( 5218): 50e06e54 e08f1001 eb03d11b e3a01003 e1a00004 ................
      I/DEBUG ( 5218): 50e06e64 e5945a3c ebffbce0 e59409fc eb007d28 <Z..........(}..
      I/DEBUG ( 5218): 50e06e74 e590705b e1a03a27 e1a03a03 e5936024 [p..':...:..$`..
      I/DEBUG ( 5218): 50e06e84 e2466058 e5961a74 e5963a78 e1510003 X`F.t...x:....Q.
      I/DEBUG ( 5218): 50e06e94 0a000014 e2813004 e5863a74 e5817000 .....0..t:...p..
      I/DEBUG ( 5218):
      I/DEBUG ( 5218): stack:
      I/DEBUG ( 5218): 50bd7aa0 001f3420 [heap]
      I/DEBUG ( 5218): 50bd7aa4 50bd7ac0
      I/DEBUG ( 5218): 50bd7aa8 00231790 [heap]
      I/DEBUG ( 5218): 50bd7aac 002317e8 [heap]
      I/DEBUG ( 5218): 50bd7ab0 00000000
      I/DEBUG ( 5218): 50bd7ab4 50e5dcf4 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50bd7ab8 00000001
      I/DEBUG ( 5218): 50bd7abc 409a9c78 /system/lib/libdvm.so
      I/DEBUG ( 5218): 50bd7ac0 409a9fd8 /system/lib/libdvm.so
      I/DEBUG ( 5218): 50bd7ac4 41503f58 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7ac8 00231790 [heap]
      I/DEBUG ( 5218): 50bd7acc 00000004
      I/DEBUG ( 5218): 50bd7ad0 416d76f0 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7ad4 00261fe8 [heap]
      I/DEBUG ( 5218): 50bd7ad8 df0027ad
      I/DEBUG ( 5218): 50bd7adc 00000000
      I/DEBUG ( 5218): #00 50bd7ae0 001be138 [heap]
      I/DEBUG ( 5218): 50bd7ae4 5120fd40 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50bd7ae8 416d76f0 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7aec 00261fe8 [heap]
      I/DEBUG ( 5218): 50bd7af0 41728140 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7af4 50d45e05 /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50bd7af8 00261fe8 [heap]
      I/DEBUG ( 5218): 50bd7afc 41728140 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7b00 41728140 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7b04 416d76f0 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7b08 00261fe0 [heap]
      I/DEBUG ( 5218): 50bd7b0c 001be138 [heap]
      I/DEBUG ( 5218): 50bd7b10 41503f38 /dev/ashmem/dalvik-heap (deleted)
      I/DEBUG ( 5218): 50bd7b14 50bd7b3c
      I/DEBUG ( 5218): 50bd7b18 00261fe8 [heap]
      I/DEBUG ( 5218): 50bd7b1c 50d48ceb /data/data/com.example.TestMe/lib/libkroll-v8.so
      I/DEBUG ( 5218): 50bd7b20 00000000
      I/DEBUG ( 5218): 50bd7b24 00013780 [heap]
      I/DEBUG ( 5218): dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_native -m 23665

      Others:

      Create the sample project using the following steps:

      1. File -> New -> Titanium Mobile Project
      2. Provide the app and package name, uncheck mobile web and press finish (do not press next and select any template).

      Tested using the continuous build 2.1.1, even in that the issue is reproducible.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                billdawson Bill Dawson
                Reporter:
                soumyakantikar Soumya Kanti Kar
              • Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-5582
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code