edit actions corrupting database

644
2
01-20-2011 12:40 PM
LisaT
by
Occasional Contributor III
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...
0 Kudos
2 Replies
LisaT
by
Occasional Contributor III
A little more information:  I have now taken EVERYTHING out except one button that starts an edit operation/starts editing and one button that stops an edit operation/stops editing...still having the issue.  Anyone know why an edit session started via code might corrupt data?
0 Kudos
LisaT
by
Occasional Contributor III
OK, last post...I have found that this is a database issue.  It is occurring on multiple test databases so it is hard to track down, however I can make the corruption happen by starting/stopping an edit session in ArcMap.  It also occurs when editing a "GUID" field that is denoted as a 40-character string.  It is my guess that the brackets "{}" around the GUID are causing the corruption. Will keep testing! But not an ArcObjects issue.
0 Kudos