Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19228] Android: App crash if add annotation with customView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2015-08-19T18:02:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.1
ComponentsAndroid
Labelsannotation, mapView
ReporterZoltan Lengyel
AssigneeHieu Pham
Created2015-07-09T13:14:11.000+0000
Updated2015-09-21T18:45:47.000+0000

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)

Comments

  1. Zoltan Lengyel 2015-07-10

    Tested on a Sony Xperia (4.0.4), result is the same...
  2. Flavio De Stefano 2015-07-16

    Yes, does'nt works.
  3. Georgi Nikolov 2015-07-17

  4. Marcus Ilgner 2015-07-21

    Same here: our app works with 4.0.0 but crashes with above error when on 4.1.0.GA.
  5. Vincent Degroote 2015-07-22

    Same problem, we can't upgrade to 4.1.0
  6. Vincent Degroote 2015-08-19

    IMHO this bug should be critical and hot fixed in the next release (5.0.0?)
  7. Hieu Pham 2015-08-19

  8. Vincent Degroote 2015-08-20

    Great. Many thanks.

JSON Source