AnsweredAssumed Answered

Bad allocation exception

Question asked by andreasbaier on Apr 27, 2016

We are using ArcGis runtime.net 2.6 in our c# application (WPF, .net 4.5.2). The application is running mainly unattended for testing/demo purposes and updating some visuals on a map (circles, lines) on a regular base (e.g. redraw every 2-5 seconds)

 

We had app crashes coming from the arcgis runtime with the following stacktrace. Somthing internally in arcgis.net is throwing it.

 

2016-04-19 01:17:16,154 [SvThread] ERROR [(null)] <(null)> - Error in main routine:

exception Details (key=value): (System.Object=) System.Exception: bad allocation

   at RuntimeCoreNet.Interop.HandleException(Boolean retVal)

   at RuntimeCoreNet.CoreGraphicsLayer.AddGraphics(ICoreGeometry[] geometries, ICoreSymbol[] symbols, CoreAttributes[] attributes, CoreGraphicSimpleProperties[] properties, Int32& startId, Int32& endId)

   at RuntimeCoreNet.CoreGraphicsLayerWrapper.AddGraphicsInternal(AdditionInfo additions, SpatialReference mapSR)

   at RuntimeCoreNet.CoreGraphicsLayerWrapper.UpdatePendingGraphics()

   at Esri.ArcGISRuntime.Controls.ViewBase.MapBatchProcess()

   at Esri.ArcGISRuntime.Controls.ViewBase._batchUpdateTimer_Tick(Object sender, Object e)

   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

The question is: what happens here? What does "bad allocation" mean?

 

It is very hard for me to tell what happens as it is so random - and obviously asyncronous, not directly triggered by code from us. How can I narrow down the root cause?

 

kind regards

 

Andreas

Outcomes