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

Android: Ti.Gesture.orientation reference crashes app

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: Release 3.0.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:
      • Android 2.2 emulator
      • Titanium Mobile SDK 2.2.0.v20120904164912
      • Titanium Studio 2.1.2.201208301612
        LG Optimus V
        android 2.2

      Description

      Problem

      There is a regression in SDK 2.2.0.v20120904164912: if you make a reference to Ti.Gesture.orientation the app will crash.

      Works in 2.1.2.GA
      Broken in 2.2.0.v20120904164912

      Testcase

      app.js

      Ti.UI.setBackgroundColor('#000');
       
      var win1 = Ti.UI.createWindow({
                   exitOnClose:true,
                   navBarHidden:false,
                   backgroundColor:'#fff'
                 });
       
      var label1 = Ti.UI.createLabel({
      	color:'#999',
      	text:'Original Orientation: '+Ti.Gesture.orientation,
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      win1.add(label1);
      win1.open();
      

      Log

      android emulator log

      ...
      [INFO][ActivityManager(   60)] Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.eCotton.GestureOrientationTest/.GestureorientationtestActivity }
      [INFO][ActivityManager(   60)] Start proc com.eCotton.GestureOrientationTest for activity com.eCotton.GestureOrientationTest/.GestureorientationtestActivity: pid=282 uid=10039 gids={1015, 3003}
      [INFO][TiApplication(  282)] (main) [0,0] checkpoint, app created.
      [INFO][TiApplication(  282)] (main) [551,551] Titanium 2.2.0 (2012/09/04 16:49 b782790)
      [INFO][TiDbHelper(  282)] (main) [220,771] No value in database for platform key: 'unique_machine_id' returning supplied default ''
      [INFO][TiDbHelper(  282)] (main) [22,793] No value in database for platform key: 'hardware_machine_id' returning supplied default ''
      [INFO][TiApplication(  282)] (main) [14,915] Titanium Javascript runtime: v8
      [INFO][TiRootActivity(  282)] (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
      [INFO][TiApplication(  282)] (main) [1,1] Analytics have been disabled
      [ERROR][TiApplication(  282)] (KrollRuntimeThread) [2359,2360] APP PROXY: ti.modules.titanium.app.AppModule@43eaa800
      [WARN][V8Object(  282)] Runtime disposed, cannot set property 'userAgent'
      [ERROR][KrollProxy(  282)] (KrollRuntimeThread) [895,3255] Error creating proxy
      [ERROR][KrollProxy(  282)] java.lang.NullPointerException
      [ERROR][KrollProxy(  282)] 	at org.apache.harmony.luni.util.FloatingPointParser.parseDouble(FloatingPointParser.java:263)
      [ERROR][KrollProxy(  282)] 	at java.lang.Double.parseDouble(Double.java:287)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.titanium.TiProperties.getDouble(TiProperties.java:136)
      [ERROR][KrollProxy(  282)] 	at ti.modules.titanium.gesture.GestureModule.<init>(GestureModule.java:55)
      [ERROR][KrollProxy(  282)] 	at java.lang.Class.newInstanceImpl(Native Method)
      [ERROR][KrollProxy(  282)] 	at java.lang.Class.newInstance(Class.java:1429)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:134)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:284)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166)
      [ERROR][KrollProxy(  282)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
      [ERROR][KrollProxy(  282)] 	at android.os.Looper.loop(Looper.java:123)
      [ERROR][KrollProxy(  282)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:108)
      [INFO][DEBUG   (   31)] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
      [INFO][DEBUG   (   31)] Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
      [INFO][DEBUG   (   31)] pid: 282, tid: 290  >>> com.eCotton.GestureOrientationTest <<<
      [INFO][DEBUG   (   31)] signal 11 (SIGSEGV), fault addr 00000000
      [INFO][DEBUG   (   31)]  r0 00000007  r1 4127c600  r2 4127c600  r3 00000000
      [INFO][DEBUG   (   31)]  r4 00000000  r5 00228fa8  r6 4127c600  r7 00000000
      [INFO][DEBUG   (   31)]  r8 0025b5c8  r9 0025c580  10 267ed345  fp 0025b5c8
      [INFO][DEBUG   (   31)]  ip 80888110  sp 465b66d0  lr 80846dad  pc 8083e98e  cpsr 00000030
      [INFO][DEBUG   (   31)]          #00  pc 0003e98e  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]          #01  pc 0002f24c  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]          #02  pc 000c6906  /data/data/com.eCotton.GestureOrientationTest/lib/libkroll-v8.so
      [INFO][DEBUG   (   31)]          #03  pc 00258efc  /data/data/com.eCotton.GestureOrientationTest/lib/libkroll-v8.so
      [INFO][DEBUG   (   31)] 
      [INFO][DEBUG   (   31)] code around pc:
      [INFO][DEBUG   (   31)] 8083e96c b0059c03 1c211c18 46c0bdf0 6905b5f0 
      [INFO][DEBUG   (   31)] 8083e97c 1c161c0c b0852101 1c1f1c28 fa02f008 
      [INFO][DEBUG   (   31)] 8083e98c 68201c31 fbe2f021 d1051e01 21071c28 
      [INFO][DEBUG   (   31)] 8083e99c f9f8f008 e00c2000 9300ab02 1c221c28 
      [INFO][DEBUG   (   31)] 8083e9ac 97012301 f942f015 21071c28 f9eaf008 
      [INFO][DEBUG   (   31)] 
      [INFO][DEBUG   (   31)] code around lr:
      [INFO][DEBUG   (   31)] 80846d8c 00000374 1c04b570 28001c0d f7ffd102 
      [INFO][DEBUG   (   31)] 80846d9c 1c04ff75 2d016866 1c20d102 ffc8f7ff 
      [INFO][DEBUG   (   31)] 80846dac 60651c30 46c0bd70 b087b5f0 f7ff9005 
      [INFO][DEBUG   (   31)] 80846dbc 4d29ff65 1c044b29 6940447d 27f058ee 
      [INFO][DEBUG   (   31)] 80846dcc 900400bf f01059f0 9904ff33 d0404281 
      [INFO][DEBUG   (   31)] 
      [INFO][DEBUG   (   31)] stack:
      [INFO][DEBUG   (   31)]     465b6690  465b6698  
      [INFO][DEBUG   (   31)]     465b6694  465b670c  
      [INFO][DEBUG   (   31)]     465b6698  00000000  
      [INFO][DEBUG   (   31)]     465b669c  39b559a0  
      [INFO][DEBUG   (   31)]     465b66a0  81451904  /data/data/com.eCotton.GestureOrientationTest/lib/libkroll-v8.so
      [INFO][DEBUG   (   31)]     465b66a4  808408e5  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66a8  00000000  
      [INFO][DEBUG   (   31)]     465b66ac  00228fa8  [heap]
      [INFO][DEBUG   (   31)]     465b66b0  00000001  
      [INFO][DEBUG   (   31)]     465b66b4  00000007  
      [INFO][DEBUG   (   31)]     465b66b8  00000000  
      [INFO][DEBUG   (   31)]     465b66bc  80846dad  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66c0  00000000  
      [INFO][DEBUG   (   31)]     465b66c4  00228fa8  [heap]
      [INFO][DEBUG   (   31)]     465b66c8  df002777  
      [INFO][DEBUG   (   31)]     465b66cc  e3a070ad  
      [INFO][DEBUG   (   31)] #00 465b66d0  00000000  
      [INFO][DEBUG   (   31)]     465b66d4  8082eef7  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66d8  0022bf78  [heap]
      [INFO][DEBUG   (   31)]     465b66dc  8086d12c  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66e0  8086d12c  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66e4  8083e979  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66e8  0022bf78  [heap]
      [INFO][DEBUG   (   31)]     465b66ec  4127c600  /dev/ashmem/dalvik-LinearAlloc (deleted)
      [INFO][DEBUG   (   31)]     465b66f0  00000000  
      [INFO][DEBUG   (   31)]     465b66f4  8082f24f  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)] #01 465b66f8  8086d12c  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b66fc  00000011  
      [INFO][DEBUG   (   31)]     465b6700  465b676c  
      [INFO][DEBUG   (   31)]     465b6704  81072ea3  /data/data/com.eCotton.GestureOrientationTest/lib/libkroll-v8.so
      [INFO][DEBUG   (   31)]     465b6708  412725bc  /dev/ashmem/dalvik-LinearAlloc (deleted)
      [INFO][DEBUG   (   31)]     465b670c  00000000  
      [INFO][DEBUG   (   31)]     465b6710  00263ae0  [heap]
      [INFO][DEBUG   (   31)]     465b6714  0022bf78  [heap]
      [INFO][DEBUG   (   31)]     465b6718  8082f1bd  /system/lib/libdvm.so
      [INFO][DEBUG   (   31)]     465b671c  00000000  
      [INFO][DEBUG   (   31)]     465b6720  00000000  
      [INFO][DEBUG   (   31)]     465b6724  810c6909  /data/data/com.eCotton.GestureOrientationTest/lib/libkroll-v8.so
      [INFO][ActivityManager(   60)] Process com.eCotton.GestureOrientationTest (pid 282) has died.
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                bitshftr Shawn Lipscomb
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code