I have a maptool where I just place a marker on a map. Nothing else, no other business logic.
The marker is placed fine, however - when you look at the debug the amount of exceptions thrown from ArcGIS.Dektop.Mapping.dll is concerning.
What is going on here, should this be happening?

Here is my simple code:
internal class FooTool : MapTool
{
private IDisposable _graphic = null;
public FooTool()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Point;
SketchOutputMode = SketchOutputMode.Map;
}
protected override async Task<bool> OnSketchCompleteAsync(ArcGIS.Core.Geometry.Geometry geometry)
{
try
{
MapPoint mapPoint = (MapPoint)geometry;
await QueuedTask.Run(() =>
{
var mapView = MapView.Active;
//Show marker
if (_graphic != null)
{
_graphic.Dispose();
}
_graphic = mapView.AddOverlay(mapPoint, SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.BlueRGB, 14, SimpleMarkerStyle.Pushpin).MakeSymbolReference());
});
}
catch (ArgumentException ae)
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(ae.Message, "Tool error");
}
catch (Exception ex)
{
Log.Error(ex);
}
return true;
}
}