I'm having a particularly odd issue occurring. I created a custom component using both the addin model and custom COM dll.
When I use the tool under one login (administrative privileges), I have no issues. The other login crashes at the oddest spot.
It crashes when I try to obtain a feature using the getfeature method from a featureclass. The error actually seems to occur as the result of obtaining the featureclass from the layer.
if not pLayer is nothing then
if not pLayer.FeatureClass is nothing then
'error occurs here:
pFeat = pLayer.FeatureClass.GetFeature(id)
end if
end if
When it crashes, I get the following error:
Error: CopyPasteTool **COM object that has been separated from its underlying RCW cannot be used.** at CopyPasteTool.bas_LoadDataTools.ListSelectedFeatures() select item in list (list items are not updated after first selection) ESRI.arcgis.Carto COM object that has been separated from its underlying RCW cannot be used. at ESRI.arcGIS.Carto.IFeatureLayer.Get_FeatureClass() at CopypasteTool.CopyPasteDocWin.list_FeatureSelection_SelectedIndexChanged(object sender, EventArgs e)
The key element of this error is of course:
"COM object that has been separated from its underlying RCW cannot be use"
This error occurs when I try to get the featureclass from a layer. The layer object is NOT null, and obtaining the featureclass elsewhere doesn't seem to cause a problem.
Has anyone else run into this error? Any strategies for resolving it?
Any help would be appreciated.
Thanks,
Mike