[TIMOB-19228] Android: App crash if add annotation with customView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-08-19T18:02:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.1 |
Components | Android |
Labels | annotation, mapView |
Reporter | Zoltan Lengyel |
Assignee | Hieu Pham |
Created | 2015-07-09T13:14:11.000+0000 |
Updated | 2015-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)
Tested on a Sony Xperia (4.0.4), result is the same...
Yes, does'nt works.
Same here: our app works with 4.0.0 but crashes with above error when on 4.1.0.GA.
Same problem, we can't upgrade to 4.1.0
IMHO this bug should be critical and hot fixed in the next release (5.0.0?)
Great. Many thanks.