Hi,
I have developed a C# ArcMap (COM) program that processes iTopologicalOperator unions and IFeatureEdit splits on a line Featureclass. I store the edits (in a dictionary) then process the edits when the user presses "Save". Periodically, I get an issue where a feature is corrupted that is FAR AWAY from the area that I am editing. The corrupt feature seems to have nothing to do with any of my edits. When looking at the attributes of the corrupt feature in ArcCatalog, there are a bunch of special characters in the text fields and negative values in the int fields. My program never even looks at the majority of these attributes. It almost seems as if ArcObjects just picks a feature and messes it up! You can see the result depicted in the attached image...the edits occur where the lines are highlighted in blue. Meanwhile, the edits I made are correctly applied to the lines I edited. If a user only edits one feature, then saves...seems like everything works OK.
There seems to be no method to the madness, as a different line seems to be corrupt almost every time...sometimes it affects multiple lines...sometimes it affects no lines. However, if I find a sequence that causes it, I can usually re-create it. It seems to me that memory is getting full somewhere, causing ArcMap to randomly choose a piece of data. Or, maybe something is happening with the spatial reference or something?? Anyone ever have this happen?? I have been working on it for days and have so far:
-messed with the union and snaptospatialreference...however it doesn't seem to be this, as at one point I just took the Union code COMPLETELY out and still had the issue
-tried putting more stopoperation and startoperations in
-tried putting in more Marshal.ReleaseCom calls
ANY ideas? This is driving me nuts...