Can you past in the stack trace for your error? Can you also show the code you think is generating it? We need a little more info to help out and any information you can provide will speed up the resolution. :-)
Actually I just found the problem a couple of hours ago. In fact same reason as with Ric. An incorrect path resulting in a missing file. The actual line that should have failed in my opinion is this one:
bitmapLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.Image = New GeoImage(“C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0\Samples\SampleData\Images\Prop Plane.png”)
The path/file didn’t exist so it should have failed here instead of at the Refresh() line.
Davids, I agree with the assessment that the error should occur at the time the invalid filename is provided, rather than at the refresh. I can appreciate that you don’t open and process the file until a refresh is called and the layer is visible. But sure would be nice to see a diagnostic to indicate the file is missing or parts of a file set are missing at the time the image or feature source is created.
I think you hit the nail on the head. We need to have a better error message to lead people to the issue. The problem is that we did not want to have to do a validation check on the file. It is a disk read and in many scenarios where you read 40 files + it really delays startup time. :-( I will see if there is any way we can make this better. Maybe we catch the error and re-raise it with a ‘Check if the file is missing’ kind of exception and then tell the file name. Of course include the source error and stack as well.