MapView 0.20.3

Hello everyone, thanks to fuse team for your hard work. I love fuse very much and using it for my small project, as soon as I can, I will definitely share it with you and community :slight_smile:

In previews version I had no problems with GeoLocation, but the final version 0.20.3 making app crash. I have no problems with getting object and data from GeoLocation module. However, problem accures when I use MapView. Am I the only one having this trouble?

Thanks in advance :slight_smile:

I got the same Problem as I got in 0.20.2

On local preview:

ERROR: Object reference not set to an instance of an object.
    System.NullReferenceException occured.
       at Fuse.Controls.MapView.UpdateCameraNextFrame() in C:\ProgramData\Uno\Packages\Fuse.Controls.MapView\0.29.23\$.uno:line 282
       at Fuse.Controls.MapView.SetZoom(Double value, IPropertyListener origin) in C:\ProgramData\Uno\Packages\Fuse.Controls.MapView\0.29.23\$.uno:line 481
       at Fuse.Controls.MapView.set_Zoom(Double value) in C:\ProgramData\Uno\Packages\Fuse.Controls.MapView\0.29.23\$.uno:line 475
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Outracks.Simulator.Runtime.TryInvokeExtension.Try(Func1 func)
       at Outracks.Simulator.Runtime.TryInvokeExtension.TryInvoke(MethodInfo mi, Object obj, Object[] value)
       at Outracks.Simulator.Runtime.CompiledTypeReflection.SetPropertyValue(Object obj, TypeMemberName propertyName, Object value)
       at Outracks.Fuse.Preview.RuntimeObjectPoker.<HookUpReflectionInterface>b__10(Object a, String b, Object c)
       at Outracks.Simulator.Reflection.DelegateReflection.Outracks.Simulator.Runtime.IReflection.SetPropertyValue(Object instance, TypeMemberName propertyName, Object value) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Reflection.Uno\0.0.0\$.uno:line 96
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(WriteProperty p) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 188
       at Outracks.Simulator.Bytecode.Expression.Match[T](Func2 a1, Func2 a2, Func2 a3, Func2 a4, Func2 a5, Func2 a6, Func2 a7, Func2 a8, Func2 a9, Func2 a10, Func2 a11, Func2 a12, Func2 a13, Func2 a15, Func2 a16) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Protocol.Uno\0.0.0\Bytecode\$.uno:line 111
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Expression expression) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 131
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(IEnumerable1 statements) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 117
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(Lambda lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 107
       at Outracks.Simulator.Runtime.LambdaClosure.Func(Object a1) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 341
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(Object lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 221
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(CallLambda i) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 163
       at Outracks.Simulator.Bytecode.Expression.Match[T](Func2 a1, Func2 a2, Func2 a3, Func2 a4, Func2 a5, Func2 a6, Func2 a7, Func2 a8, Func2 a9, Func2 a10, Func2 a11, Func2 a12, Func2 a13, Func2 a15, Func2 a16) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Protocol.Uno\0.0.0\Bytecode\$.uno:line 106
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Expression expression) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 131
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(IEnumerable1 statements) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 117
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(Lambda lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 107
       at Outracks.Simulator.Runtime.LambdaClosure.Func(Object a1) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 341
       at Outracks.Simulator.Runtime.LambdaClosure.Action(Object a1) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 321
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(Object lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 231
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(CallLambda i) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 163
       at Outracks.Simulator.Bytecode.Expression.Match[T](Func2 a1, Func2 a2, Func2 a3, Func2 a4, Func2 a5, Func2 a6, Func2 a7, Func2 a8, Func2 a9, Func2 a10, Func2 a11, Func2 a12, Func2 a13, Func2 a15, Func2 a16) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Protocol.Uno\0.0.0\Bytecode\$.uno:line 106
       at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Expression expression) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 131
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(IEnumerable`1 statements) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 117
       at Outracks.Simulator.Runtime.ScopeClosure.Execute(Lambda lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 107
       at Outracks.Simulator.Runtime.VirtualMachine.Execute(IReflection reflection, Lambda lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 78
       at Outracks.Simulator.Runtime.VirtualMachine.Execute(Lambda lambda, Object[] arguments) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\Runtime\$.uno:line 73
       at Outracks.Simulator.Reifying.OnEnterState() in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\$.uno:line 561
       at Outracks.Simulator.Application.SetState(State nextState) in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\$.uno:line 262
       at Outracks.Simulator.Application.OnUpdate() in C:\ProgramData\Uno\Packages\Outracks.Simulator.Client.Uno\0.1.0\$.uno:line 252
       at Fuse.App.Update() in C:\ProgramData\Uno\Packages\Fuse.Desktop\0.29.23\$.uno:line 50

On Android (no preview):

I/art     (27406): Late-enabling -Xcheck:jni
E/AndroidRuntime(27406): FATAL EXCEPTION: main
E/AndroidRuntime(27406): Process: com.apps.testproject2, PID: 27406
E/AndroidRuntime(27406): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apps.testproject2/com.apps.testproject2.TestProject2}: java.lang.RuntimeException: Object reference was null
E/AndroidRuntime(27406):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2406)
E/AndroidRuntime(27406):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2466)
E/AndroidRuntime(27406):        at android.app.ActivityThread.access$1200(ActivityThread.java:152)
E/AndroidRuntime(27406):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1341)
E/AndroidRuntime(27406):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(27406):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(27406):        at android.app.ActivityThread.main(ActivityThread.java:5538)
E/AndroidRuntime(27406):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27406):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(27406):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
E/AndroidRuntime(27406):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
E/AndroidRuntime(27406): Caused by: java.lang.RuntimeException: Object reference was null
E/AndroidRuntime(27406):        at com.apps.testproject2.ActivityNativeEntryPoints.cppOnCreate(Native Method)
E/AndroidRuntime(27406):        at com.apps.testproject2.TestProject2.onCreate(TestProject2.java:159)
E/AndroidRuntime(27406):        at android.app.Activity.performCreate(Activity.java:6013)
E/AndroidRuntime(27406):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
E/AndroidRuntime(27406):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2359)
E/AndroidRuntime(27406):        ... 10 more
I/Process (27406): Sending signal. PID: 27406 SIG: 9
I/HwSystemManager( 3686): HoldService:uid:10185 pid:27406 died
I/HwSystemManager( 3686): HoldService:oldVersionKey:10185,27406
I/MediaProcessHandler( 2908): processOp opType: 1, uid: 10185, pid: 27406
W/MediaProcessHandler( 2908): remove target not exist, maybe the UI process: uid: 10185, pid: 27406

The Code (as simple as it could be):

<App>
    <MapView Latitude="51.9623600" Longitude="7.6257100" Zoom="10"/>
</App>

At a minimum the MapView should be inside a <NativeViewHost>. Can you try that as well?

At first it was working great, I mean before 0.20. I was using in the .

I am on Windows 10. If thats helps somehow.

Have a good day fuse team:)

same error here:

    <DockPanel ux:Class="MapPage">
        <Router ux:Dependency="router" />
        <JavaScript File="map.js" />

        <Panel>
            <NativeViewHost>
                <MapView Latitude="41.5667" Longitude="2.0167"> 
                    <Each Items="{uxMapPageMapMarkers}">
                        <MapMarker Latitude="{lat}" Longitude="{lng}" Label="{name}" />
                    </Each>
                </MapView>
            </NativeViewHost>
       </Panel>
   </DockPanel>

i was getting app crashes (no errors before updating to 0.20) with this code:

        <MapView Latitude="{uxMapPageLat}" Longitude="{uxMapPageLng}" ShowMyLocation="{uxMapPageShowOwnLocation}" Zoom="{uxMapPageZoom}" ShowMyLocationButton="true"> 

so i thought the problem was some of the parameters but i keep getting the app crash even hardcoding the lat - lng (first example)

Hey guys, the MapView has been refactored for stability and general smartness and this should no longer occur as of the next release. Sorry for the inconvenience here, and thanks for reporting

Hello, thank you fuse team :slight_smile: And may I ask if this update will be available this week?

The next release (including this fix) is scheduled for next week.

Thank you guys :slight_smile: you are awesome. p.s.Sorry for bothering