Hi Tom,
Thanks for the great test case. I'm able to reproduce the crash
consistently with it as well. I haven't tracked down the root cause
yet, but, if it helps, the NPObject deleted error crops up when the
parsed KML object is set as the outerBoundary on those polygons. You
might not be able to replace that line, but you might try some
variations on the KML string you generate (maybe replacing the entire
geometry object and not just the boundary object) to see if that lets
you work around the issue. On the other hand, you mentioned being able
to produce the crash in other circumstances, so the problem might not
be avoidable.
For anyone else running into this problem, Tom filed a bug here:
http://code.google.com/p/earth-api-samples/issues/detail?id=677
You can star that issue to get updates.
Thanks again (and sorry for any lost hair),
Brendan