Answer
This problem is addressed in ArcGIS 8.1 Service Pack 1. See the Related Information section to download this pack.
Using ArcObjects, if a raster layer is included in the selection environment, when clear selection is called, custom- built applications will produce a fatal error, but this is fixed in ArcGIS 8.1 Service Pack 1. This functionality was originally designed for ArcGIS only but now works in other custom-built applications just as well.