MapSuite Team,
Every so often my application encounters a FeatureLayer_DrawingException & FeatureLayer_DrawnException both stating “Collection was modified”.
The layer on which the exception occurs is a ShapeFileFeatureLayer of city streets.
The layer is for display only and is not modified.
TheFeatureLayer.FeatureSource.GeoCache.IsActive Property is set to True.
Your assistance is appreciated.
Thanks,
Dennis
CollectionWasModifiedTranspertaionLayertxt.txt (690 Bytes)
Collection Was Modified Exception
Hi Dennis,
You mean that it can runs into exception sometimes when only using a ShapeFileFeatureLayer of city streets? I was unable to recreate the issue in my end with “How Do I” sample, would you please update a demo here? It’s better that it’s attached with demo data as well.
Thanks,
Johnny
Johnny,
We never use just the streets layers so I do not know if these exceptions occur with just the streets.
The application supports many ShapeFileFeatureLayers, MrSid’s, SQLite’s, and InMemoryFeatureLayer’s.
There could be as many as 40+ layers visible at any one time.
I’m sure this is some sort of timing related issue due to all the activity with so many layers.
These exceptions are intermittent and typically only occur in a live environment. I also support a very active InMemoryFeatureLayer that receives on the order of 2 million messages in a 24 hour period so the map is quite active.
In order to send you a demo I’d have to send you my entire application which is 10’s of thousands of lines of code along with 16GB of data so not sure that is practical.
Dennis
Hi Dennis,
I guess this should be really hard for us to make it resolved, if there isn’t any further information provided, such as stack trace, demo code or something related stuffs, could you please try recreate it in your end under debug mode at first? At least, we need to narrow the issue to a small area, for example, make sure which layer causes the problem, and what’s the stack trace etc.
Looking forward to your further information.
Thanks,
Johnny