Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2476] NullPointerException when click Map Annotation TIMOB-12857

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-01-17T06:54:13.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsMapModule
ReporterJorge E. Aparicio
AssigneeRitu Agrawal
Created2013-03-19T16:49:47.000+0000
Updated2016-03-08T07:41:31.000+0000

Description

Hi, good day, I'm developing an app with MapModule updated but the problem is present when click annotation in a map. 03-15 10:06:34.060: E/TiApplication(13011): (main) [18509,103048] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.0.2,2013/02/15 19:02,5a77fe7 03-15 10:06:34.060: E/TiApplication(13011): java.lang.NullPointerException 03-15 10:06:34.060: E/TiApplication(13011): at ti.map.TiUIMapView.onMarkerClick(TiUIMapView.java:369) 03-15 10:06:34.060: E/TiApplication(13011): at com.google.android.gms.maps.GoogleMap$4.f(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at com.google.android.gms.internal.an$a.onTransact(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at android.os.Binder.transact(Binder.java:300) 03-15 10:06:34.060: E/TiApplication(13011): at com.google.android.gms.maps.internal.IOnMarkerClickListener$Stub$Proxy.onMarkerClick(IOnMarkerClickListener.java:84) 03-15 10:06:34.060: E/TiApplication(13011): at maps.z.by.a(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.y.ba.a(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.y.d.c(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.y.bj.a(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.y.v.c(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.y.bf.onSingleTapConfirmed(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.d.v.onSingleTapConfirmed(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at maps.d.j.handleMessage(Unknown Source) 03-15 10:06:34.060: E/TiApplication(13011): at android.os.Handler.dispatchMessage(Handler.java:99) 03-15 10:06:34.060: E/TiApplication(13011): at android.os.Looper.loop(Looper.java:137) 03-15 10:06:34.060: E/TiApplication(13011): at android.app.ActivityThread.main(ActivityThread.java:4464) 03-15 10:06:34.060: E/TiApplication(13011): at java.lang.reflect.Method.invokeNative(Native Method) 03-15 10:06:34.060: E/TiApplication(13011): at java.lang.reflect.Method.invoke(Method.java:511) 03-15 10:06:34.060: E/TiApplication(13011): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822) 03-15 10:06:34.060: E/TiApplication(13011): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589) 03-15 10:06:34.060: E/TiApplication(13011): at dalvik.system.NativeStart.main(Native Method) 03-15 10:06:34.200: E/AndroidRuntime(13011): FATAL EXCEPTION: main 03-15 10:06:34.200: E/AndroidRuntime(13011): java.lang.NullPointerException 03-15 10:06:34.200: E/AndroidRuntime(13011): at ti.map.TiUIMapView.onMarkerClick(TiUIMapView.java:369) 03-15 10:06:34.200: E/AndroidRuntime(13011): at com.google.android.gms.maps.GoogleMap$4.f(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at com.google.android.gms.internal.an$a.onTransact(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at android.os.Binder.transact(Binder.java:300) 03-15 10:06:34.200: E/AndroidRuntime(13011): at com.google.android.gms.maps.internal.IOnMarkerClickListener$Stub$Proxy.onMarkerClick(IOnMarkerClickListener.java:84) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.z.by.a(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.y.ba.a(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.y.d.c(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.y.bj.a(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.y.v.c(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.y.bf.onSingleTapConfirmed(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.d.v.onSingleTapConfirmed(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at maps.d.j.handleMessage(Unknown Source) 03-15 10:06:34.200: E/AndroidRuntime(13011): at android.os.Handler.dispatchMessage(Handler.java:99) 03-15 10:06:34.200: E/AndroidRuntime(13011): at android.os.Looper.loop(Looper.java:137) 03-15 10:06:34.200: E/AndroidRuntime(13011): at android.app.ActivityThread.main(ActivityThread.java:4464) 03-15 10:06:34.200: E/AndroidRuntime(13011): at java.lang.reflect.Method.invokeNative(Native Method) 03-15 10:06:34.200: E/AndroidRuntime(13011): at java.lang.reflect.Method.invoke(Method.java:511) 03-15 10:06:34.200: E/AndroidRuntime(13011): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822) 03-15 10:06:34.200: E/AndroidRuntime(13011): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589) 03-15 10:06:34.200: E/AndroidRuntime(13011): at dalvik.system.NativeStart.main(Native Method)

Comments

  1. Davide Cassenti 2013-03-20

    Hello, Can you please provide a sample code to replicate the problem? Thank you
  2. Jorge E. Aparicio 2013-03-20

    Hi Davide, thanks for your time, I'm attach a Project with the issue in this link: https://dl.dropbox.com/u/16053085/MapTest.zip The code used in my app is:
       var MapModule = require('ti.map');
       
       
       /***
        *  Args example
        *  {
        * 		titulo_mapa: 'Ágora de la Ciudad de Xalapa',
        * 		subtitulo_mapa: 'Bajos del Parque Juárez s/n. Centro',
        * 		latitude: 19.526586455103,
        * 		longitude: -96.923961639404
        * 	}
        *  
        */
       
       
       function NormalView(args) {
       	
       	// properties to render the view
       	var opciones = args || {};
       
       	var mapWrapper = Ti.UI.createView({
       		backgroundColor: '#FFF',
       		width: Ti.UI.FILL,
       		height: 400 /*  px  */ 
       	})
       	
       	var mapview = MapModule.createView({
       		mapType : MapModule.NORMAL_TYPE,
       		regionFit : true,
       		userLocation : false,
       	});
       
       	mapWrapper.add(mapview);
       
       	var ubicacion = MapModule.createAnnotation({
       		latitude : opciones.latitude,						/* Latitud */
       		longitude : opciones.longitude,						/* Longitud */
       		title : opciones.titulo_mapa,						/* Titulo mapa */
       		subtitle : opciones.subtitulo_mapa,					/* Subtitulo de mapa */
       		Image : '/images/pin-map.png',
       		draggable : false
       	});
       
       	mapview.region = {
       		latitude : opciones.latitude,
       		longitude : opciones.longitude,
       		latitudeDelta : 0.007,
       		longitudeDelta : 0.007
       	};
       	
       	
       	mapview.addAnnotation(ubicacion);
       
       		
       	return mapWrapper;
       		
       }
       
       module.exports = NormalView;
       
       
  3. Josh Jensen 2013-04-02

    I am having the exact same issue. This is marked as "Needs more info." What info is needed to get this resolved. Thanks!
  4. Ritu Agrawal 2014-01-17

    We have not been able to reproduce the reported issue with 3.2.0 SDK release. Please note that there were a number of native map crashes and memory leaks on Android platform that were resolved with V2 version. We would suggest you to upgrade to 3.2.0 SDK and let us know if the issue persists and we would be happy to investigate it further.

JSON Source