fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

java.lang.NullPointerException in Fuse.Maps #92

Open kusma opened 7 years ago

kusma commented 7 years ago

If I modify ManualTestingApp like so:

diff --git a/Tests/ManualTests/ManualTestingApp/MainView.ux b/Tests/ManualTests/ManualTestingApp/MainView.ux
index 4bcaabd..a890db5 100644
--- a/Tests/ManualTests/ManualTestingApp/MainView.ux
+++ b/Tests/ManualTests/ManualTestingApp/MainView.ux
@@ -138,8 +138,10 @@
            <HitTestPage/>
            <DefaultFonts/>
            <Pages.SurfaceMisc/>
+           <MapViewPage/>

            <Android>
+               <MapViewPage/>
                <WebViewPage/>
                <BackButtonView/>
            </Android>
diff --git a/Tests/ManualTests/ManualTestingApp/ManualTestingApp.unoproj b/Tests/ManualTests/ManualTestingApp/ManualTestingApp.unoproj
index b3f75e8..2fc3740 100644
--- a/Tests/ManualTests/ManualTestingApp/ManualTestingApp.unoproj
+++ b/Tests/ManualTests/ManualTestingApp/ManualTestingApp.unoproj
@@ -1,5 +1,10 @@
 {
   "Version": "0.0.0.0",
+  "Android": {
+     "Geo": {
+          "ApiKey": "**REDACTED**"
+      }
+  },
   "Packages": [
     "Fuse",
     "FuseJS",
diff --git a/Tests/ManualTests/ManualTestingApp/Singles/MapViewPage.ux b/Tests/ManualTests/ManualTestingApp/Singles/MapViewPage.ux
index b05b2cc..9e555a6 100644
--- a/Tests/ManualTests/ManualTestingApp/Singles/MapViewPage.ux
+++ b/Tests/ManualTests/ManualTestingApp/Singles/MapViewPage.ux
@@ -21,8 +21,15 @@

    <NativeViewHost>
        <DockPanel>
+           <Panel Dock="Bottom">
+               <Slider Margin="40,0" Alignment="VerticalCenter">
+                   <ProgressAnimation>
+                       <Change map.Zoom="10" />
+                   </ProgressAnimation>
+               </Slider>
+           </Panel>
            <WhileVisible>
-               <MapView Latitude="{lat}" Longitude="{lng}">
+               <MapView ux:Name="map" Latitude="{lat}" Longitude="{lng}">
                    <Each Items="{markers}">
                        <MapMarker Latitude="{latitude}" Longitude="{longitude}" Label="{label}"/>
                    </Each>

I get a java.lang.NullPointerException that takes down the whole app:

06-07 12:08:56.358 15453 15453 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void com.fusetools.maps.FuseMap$FuseMapCallback.onCameraChange(double, double, double, double, double)' on a null object reference
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.fusetools.maps.FuseMap.onCameraChanged(FuseMap.java:335)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.fusetools.maps.FuseMap.access$100(FuseMap.java:24)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.fusetools.maps.FuseMap$2.onCameraChange(FuseMap.java:113)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.google.android.gms.maps.GoogleMap$13.onCameraChange(Unknown Source)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.google.android.gms.maps.internal.zze$zza.onTransact(Unknown Source)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at android.os.Binder.transact(Binder.java:499)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.google.android.gms.maps.internal.x.a(:com.google.android.gms.DynamiteModulesB:12)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.google.maps.api.android.lib6.gmm6.api.b.run(:com.google.android.gms.DynamiteModulesB:12)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:751)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:241)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6217)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
06-07 12:08:56.358 15453 15453 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Sunjammer commented 7 years ago

Love it when bugs come back from the grave