Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics

Discussion created by lgxdw on Nov 21, 2012
Latest reply on Aug 19, 2013 by Holywhippet
I currently have a case open with ESRI helping us to resolve this. I'm posting here because of the large amount of time it took to find this issue to help others. I have been experiencing a significant number of seemingly random crashes with ArcGIS 10.1 SP1. The issue has been narrowed down to IDataStatistics and IEnumerator (you must loop through the statistics with the enum to cause issue). Running statistics more than once (on different layers or the same layer) can cause a complete crash of ArcMap. It is random as to how many uses of IDataStatistics  will cause the crash, often three or four uses but sometimes as many as 100 which gives the error its random nature. It also causes strange issues with the UI, in the sample code the values are added to a list view which will suddenly switch to foreign characters. Errors we have received since updating to SP1 include System.AccessViolationException (Attempted to read write protected memory), 'FatalExecutionEngineError', 'Assert Failure' and �??ExecutionEngineException�?�. Tested on 32 and 64bit versions of Windows 7 and 32 bit XP

Tested the code without SP1 and it is fine. We have submitted this to ESRI UK and we are awaiting feedback.

Paste bin of the test code submitted to ESRI UK

Has anyone else working with ArcObjects been receiving issues? I will post back when ESRI do