Esri / distance-direction-addin-dotnet

Add-in provides the ability to easily and quickly create geodesy lines, circles, ellipses and range rings.
Apache License 2.0
17 stars 22 forks source link

Entering a very large Radius/Diameter value when creating a circle causes Exception to be thrown in Visual Studio (ArcMap) #199

Closed rjones0 closed 7 years ago

rjones0 commented 7 years ago

Procedure:

  1. Open solution in Visual Studio
  2. Build addin and double click addin to install in ArcMap
  3. Start ArcMap
  4. In Visual Studio attach to ArcMap process
  5. In ArcMap add a world background data source
  6. Display Circle tab on Distance and Direction addin UI panel
  7. Click Map Point tool
  8. Click on map to create a point
  9. Click in Radius/Diameter text box
  10. Enter a 1 and then keep adding zeros

Result: At 100000000 upwards an exception is thrown (after continuing in Visual Studio, ArcMap continues to run ok but exception should be handled):

System.Runtime.InteropServices.COMException was unhandled by user code HelpLink="Geometry.hlp" HResult=-2147220982 Message=The parameter is (or has an element that is) the wrong kind of geometry. Source="esri.Polyline" ErrorCode=-2147220982 StackTrace: at ESRI.ArcGIS.Geometry.PolylineClass.ConstructGeodesicCircle(IPoint CenterPoint, ILinearUnit LinearUnit, Double Radius, esriCurveDensifyMethod densifyMethod, Double densifyParameter) at ArcMapAddinDistanceAndDirection.ViewModels.CircleViewModel.UpdateFeedbackWithGeoCircle() in c:\RWJ\EsriInc\githubclone\distance-direction-addin-dotnet\source\DistanceAndDirection\ArcMapAddinDistanceAndDirection\ArcMapAddinDistanceAndDirection\ViewModels\CircleViewModel.cs:line 412 at ArcMapAddinDistanceAndDirection.ViewModels.CircleViewModel.set_DistanceString(String value) in c:\RWJ\EsriInc\githubclone\distance-direction-addin-dotnet\source\DistanceAndDirection\ArcMapAddinDistanceAndDirection\ArcMapAddinDistanceAndDirection\ViewModels\CircleViewModel.cs:line 304 InnerException:

mfunk commented 7 years ago

Similar if not same as #198

rjones0 commented 7 years ago

Cannot recreate now, closing.