title: Android maps v2 showInfoWindow() causes crash, at com.google.android.gms.maps.model.Marker.showInfoWindow(Unknown Source)
body: <p>Friends,</p>
  
  <p>has anyone an idea why the marker.showInfoWindow() method crashes? with the following error code.
  Everything works fine when i don´t use that method, all markers are clickable in the map and all the custom info windows appear on screen on user click just as desired. </p>
  
  <p>Thanks for any help</p>
  
  <pre><code>private void addGoogleMapAdvertisementMarker(ValueObjectAdvertiserData valueObjectAdvertiserData) {
  
      // adds a single advertisement marker to the map and
      // stores the individual marker to the arraylist markers
     Marker marker = map.addMarker(new MarkerOptions()
              .position(new LatLng(valueObjectAdvertiserData.latitude, valueObjectAdvertiserData.longitude))
              .title(valueObjectAdvertiserData.headline)
              .snippet(valueObjectAdvertiserData.description)
              .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));
      marker.showInfoWindow();
  
      markers.add(marker);
  }
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>04-17 19:09:58.540  25708-25708/il.co.shabeng.SLDMP E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: il.co.shabeng.SLDMP, PID: 25708
      java.lang.RuntimeException: Unable to start activity ComponentInfo{il.co.shabeng.SLDMP/il.co.shabeng.SLDMP.ActivityMain}: java.lang.NullPointerException
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2328)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
              at android.app.ActivityThread.access$900(ActivityThread.java:169)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5476)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.NullPointerException
              at il.co.shabeng.SLDMP.ActivityMain$1.getInfoContents(ActivityMain.java:244)
              at com.google.android.gms.maps.GoogleMap$13.zzg(Unknown Source)
              at com.google.android.gms.maps.internal.zzd$zza.onTransact(Unknown Source)
              at android.os.Binder.transact(Binder.java:361)
              at com.google.android.gms.maps.internal.p.b(SourceFile:112)
              at com.google.maps.api.android.lib6.c.h.a(Unknown Source)
              at com.google.maps.api.android.lib6.c.h.a(Unknown Source)
              at com.google.maps.api.android.lib6.gmm6.c.h.b(Unknown Source)
              at com.google.maps.api.android.lib6.gmm6.c.j.c(Unknown Source)
              at com.google.maps.api.android.lib6.c.aj.g(Unknown Source)
              at com.google.android.gms.maps.model.internal.t.onTransact(SourceFile:145)
              at android.os.Binder.transact(Binder.java:361)
              at com.google.android.gms.maps.model.internal.zzl$zza$zza.showInfoWindow(Unknown Source)
              at com.google.android.gms.maps.model.Marker.showInfoWindow(Unknown Source)
              at il.co.shabeng.SLDMP.ActivityMain.addGoogleMapAdvertisementMarker(ActivityMain.java:204)
              at il.co.shabeng.SLDMP.ActivityMain.placeAdMarkersOnMap(ActivityMain.java:169)
              at il.co.shabeng.SLDMP.ActivityMain.onCreate(ActivityMain.java:106)
              at android.app.Activity.performCreate(Activity.java:5451)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
              at android.app.ActivityThread.access$900(ActivityThread.java:169)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5476)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
              at dalvik.system.NativeStart.main(Native Method)
  </code></pre>