Sketch Editor hard crash in MAUI

1361
8
Jump to solution
05-13-2022 02:51 AM
hayer
by
New Contributor II

Sketch Editor makes the program crash when moving a vertex. Deleting vertices works fine.

Happens when using;

  • Esri.ArcGISRuntime.Maui version 100.14.0-preview2  (also happend in earlier versions)
  • Esri.ArcGISRuntime.WinUI version 100.14.0

Exception

 

 

 

 

Faulting application name: MyProgam.exe, version: 1.0.0.0, time stamp: 0x62571213
Faulting module name: CoreMessagingXP.dll, version: 10.0.22467.1020, time stamp: 0xcb3186f5
Exception code: 0xc000027b
Fault offset: 0x0000000000095b2c
Faulting process ID: 0x0x10A0
Faulting application start time: 0x0x1D866AD9E26D744
Faulting application path: C:\Users\<...>\MyProgram.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.0_3.469.1654.0_x64__8wekyb3d8bbwe\CoreMessagingXP.dll
Report ID: 96db5917-feb8-4250-b12a-3870ea711455
Faulting package full name: 42b5bb5f-a561-4075-b936-0286994fd075_1.0.0.1_x64__9zz4h110yvjzm
Faulting package-relative application ID: App

 

 

 

 

TargetFramework is net6.0-windows10.0.19041
TargetPlatformMinVersion is 10.0.19041.0

 

Edit:

One, of many, offending polygons

{"rings":[[[28.309655000000078,70.540905000000066],[28.403449000000023,70.510430000000042],[28.399771000000044,70.500051000000042],[28.35941500000007,70.487775000000056],[28.33516000000003,70.476974000000041],[28.309078000000056,70.450761000000057],[28.304184000000078,70.446040000000039],[28.295386000000065,70.439965000000029],[28.28324200000003,70.433109000000059],[28.268496000000027,70.425224000000071],[28.25207400000005,70.418677000000059],[28.227295000000026,70.410380000000032],[28.223170000000039,70.408862000000056],[28.218629000000078,70.406914000000029],[28.215925000000027,70.405530000000056],[28.213705000000061,70.404005000000041],[28.200345000000027,70.405896000000041],[28.199266000000023,70.405929000000071],[28.199054000000046,70.405939000000046],[28.198916000000054,70.405992000000083],[28.194075000000055,70.40670300000005],[28.192904000000055,70.406964000000073],[28.181576000000064,70.409444000000065],[28.179857000000027,70.408524000000057],[28.178476000000046,70.409169000000077],[28.175197000000026,70.409530000000075],[28.171282000000076,70.409568000000036],[28.165715000000034,70.409115000000043],[28.165634000000068,70.409203000000048],[28.165445000000034,70.409338000000048],[28.165144000000055,70.409470000000056],[28.164892000000066,70.409635000000037],[28.164721000000043,70.409825000000069],[28.164509000000066,70.410019000000034],[28.164243000000056,70.410283000000049],[28.164035000000069,70.410371000000055],[28.163829000000078,70.410431000000074],[28.163745000000063,70.410492000000033],[28.163700000000063,70.410584000000028],[28.163732000000039,70.410669000000041],[28.163766000000066,70.410845000000052],[28.163861000000054,70.410942000000034],[28.163830000000075,70.411027000000047],[28.163722000000064,70.411110000000065],[28.163490000000024,70.411156000000062],[28.163278000000048,70.41121400000003],[28.163042000000075,70.411332000000073],[28.162894000000051,70.411421000000075],[28.162751000000071,70.411577000000079],[28.162631000000033,70.411681000000044],[28.162418000000059,70.411737000000073],[28.162083000000052,70.411801000000082],[28.161881000000051,70.411914000000081],[28.16161100000005,70.412030000000073],[28.157516000000044,70.414259000000072],[28.129609000000073,70.415067000000079],[28.115793000000053,70.42289500000004],[28.143167000000062,70.441414000000066],[28.155598000000055,70.447324000000037],[28.171614000000034,70.45575000000008],[28.185207000000048,70.460771000000079],[28.196145000000058,70.465699000000029],[28.235099000000048,70.468457000000058],[28.274880000000053,70.478925000000061],[28.284531000000072,70.493888000000084],[28.320109000000059,70.498712000000069],[28.318239000000062,70.506216000000052],[28.309655000000078,70.540905000000066]]],"spatialReference":{"wkid":4258}}  

 

1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Thanks for the repro. I'm able to reproduce now. There's a limitation in the sketch editor editing geometries in a different spatial reference than the mapview. Granted that error could be better and shouldn't crash like this, but for now, you can address it by reprojecting before editing:

 

var editedGeom = await mapView.SketchEditor.StartAsync(GeometryEngine.Project(geom, map.SpatialReference));

 

View solution in original post

8 Replies
PreetiMaske
Esri Contributor

Hi,

I ported over forms SketchOnMap sample to MAUI and tried deleting the vertex and did not see any crash. Would you like to share your test app with a simple repro? I would be happy to try and see if I can reproduce it as well.

Thanks,

Preeti

0 Kudos
hayer
by
New Contributor II

Thanks for taking your time to test it.

Deleting vertices works fine. Its moving any of them which causes the crash. It doesn't happen for all polygons - only some. Seems to be more common polygons with many vertices, >200. Don't have the data accessible right now but I will post one of the offending polygons later to night 🙂

0 Kudos
hayer
by
New Contributor II
{"rings":[[[28.309655000000078,70.540905000000066],[28.403449000000023,70.510430000000042],[28.399771000000044,70.500051000000042],[28.35941500000007,70.487775000000056],[28.33516000000003,70.476974000000041],[28.309078000000056,70.450761000000057],[28.304184000000078,70.446040000000039],[28.295386000000065,70.439965000000029],[28.28324200000003,70.433109000000059],[28.268496000000027,70.425224000000071],[28.25207400000005,70.418677000000059],[28.227295000000026,70.410380000000032],[28.223170000000039,70.408862000000056],[28.218629000000078,70.406914000000029],[28.215925000000027,70.405530000000056],[28.213705000000061,70.404005000000041],[28.200345000000027,70.405896000000041],[28.199266000000023,70.405929000000071],[28.199054000000046,70.405939000000046],[28.198916000000054,70.405992000000083],[28.194075000000055,70.40670300000005],[28.192904000000055,70.406964000000073],[28.181576000000064,70.409444000000065],[28.179857000000027,70.408524000000057],[28.178476000000046,70.409169000000077],[28.175197000000026,70.409530000000075],[28.171282000000076,70.409568000000036],[28.165715000000034,70.409115000000043],[28.165634000000068,70.409203000000048],[28.165445000000034,70.409338000000048],[28.165144000000055,70.409470000000056],[28.164892000000066,70.409635000000037],[28.164721000000043,70.409825000000069],[28.164509000000066,70.410019000000034],[28.164243000000056,70.410283000000049],[28.164035000000069,70.410371000000055],[28.163829000000078,70.410431000000074],[28.163745000000063,70.410492000000033],[28.163700000000063,70.410584000000028],[28.163732000000039,70.410669000000041],[28.163766000000066,70.410845000000052],[28.163861000000054,70.410942000000034],[28.163830000000075,70.411027000000047],[28.163722000000064,70.411110000000065],[28.163490000000024,70.411156000000062],[28.163278000000048,70.41121400000003],[28.163042000000075,70.411332000000073],[28.162894000000051,70.411421000000075],[28.162751000000071,70.411577000000079],[28.162631000000033,70.411681000000044],[28.162418000000059,70.411737000000073],[28.162083000000052,70.411801000000082],[28.161881000000051,70.411914000000081],[28.16161100000005,70.412030000000073],[28.157516000000044,70.414259000000072],[28.129609000000073,70.415067000000079],[28.115793000000053,70.42289500000004],[28.143167000000062,70.441414000000066],[28.155598000000055,70.447324000000037],[28.171614000000034,70.45575000000008],[28.185207000000048,70.460771000000079],[28.196145000000058,70.465699000000029],[28.235099000000048,70.468457000000058],[28.274880000000053,70.478925000000061],[28.284531000000072,70.493888000000084],[28.320109000000059,70.498712000000069],[28.318239000000062,70.506216000000052],[28.309655000000078,70.540905000000066]]],"spatialReference":{"wkid":4258}}
0 Kudos
dotMorten_esri
Esri Notable Contributor

I haven't been able to reproduce this either. Any chance you could share a small sample that reproduces this behavior?

0 Kudos
hayer
by
New Contributor II
0 Kudos
hayer
by
New Contributor II

@dotMorten_esri any idea what might be causing this?

@PreetiMaske feel free to take a look at the repo linked above 🙂

0 Kudos
dotMorten_esri
Esri Notable Contributor

Thanks for the repro. I'm able to reproduce now. There's a limitation in the sketch editor editing geometries in a different spatial reference than the mapview. Granted that error could be better and shouldn't crash like this, but for now, you can address it by reprojecting before editing:

 

var editedGeom = await mapView.SketchEditor.StartAsync(GeometryEngine.Project(geom, map.SpatialReference));

 

hayer
by
New Contributor II

Ah, okay! Thanks. Didn't think that would cause an issue, and as you state the error message could maybe be a tad better.

Using workaround you suggested for now. 

0 Kudos