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

Android: App crash if add annotation with customView

    Details

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

      OSX 10.10.4, Appcelerator Studio 4.1.0.201507071245, SDK 4.1.0GA, Samsung Galaxy GT-S7580, Android 4.2.2

      Description

      From SDK 4.1.0 this code fails:

      		var aMView = Ti.UI.createView({
      			top: 0, 
      			zIndex: 10		
      		});
      			var aMImgView = Ti.UI.createImageView({
      				top:0,
      				image: 'KS_nav_ui.png'
      			});
      			aMView.add(aMImgView);
      		ann = MapModule.createAnnotation({
      			latitude: 47.49,
      			longitude: 19.13,
      			title: 'Text',
      			animate: true,
      			customView: aMView // This is the correct view, but it doesn't affect the problem, still crashing...
      		});
      		map1.addAnnotation(ann);
      

      Error in log:

      [INFO] :   dalvikvm: Could not find method org.appcelerator.titanium.proxy.TiViewProxy.toImage, referenced from method ti.map.AnnotationProxy.handleCustomView
      [WARN] :   dalvikvm: VFY: unable to resolve virtual method 42619: Lorg/appcelerator/titanium/proxy/TiViewProxy;.toImage ()Lorg/appcelerator/kroll/KrollDict;
      [INFO] :   I/dalvikvm-heap: Grow heap (frag case) to 16.157MB for 1048592-byte allocation
      [ERROR] :  dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
      [WARN] :   dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41d84930)
      [ERROR] :  TiApplication: (main) [69192,69192] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage; Titanium 4.1.0,2015/07/06 11:15,d57aa7d
      [ERROR] :  TiApplication: java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage
      [ERROR] :  TiApplication: 	at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206)
      [ERROR] :  TiApplication: 	at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192)
      [ERROR] :  TiApplication: 	at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:404)
      [ERROR] :  TiApplication: 	at ti.map.ViewProxy.handleAddAnnotation(ViewProxy.java:280)
      [ERROR] :  TiApplication: 	at ti.map.ViewProxy.handleMessage(ViewProxy.java:96)
      [ERROR] :  TiApplication: 	at android.os.Handler.dispatchMessage(Handler.java:95)
      [ERROR] :  TiApplication: 	at android.os.Looper.loop(Looper.java:176)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.main(ActivityThread.java:5317)
      [ERROR] :  TiApplication: 	at java.lang.reflect.Method.invokeNative(Native Method)
      [ERROR] :  TiApplication: 	at java.lang.reflect.Method.invoke(Method.java:511)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
      [ERROR] :  TiApplication: 	at dalvik.system.NativeStart.main(Native Method)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                tcheeco Zoltan Lengyel
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code