Underworld - S15-E5
Corrected entry: A newly formed planet would be molten rock for several million years and thus totally impossible for human life to exist on (or in). Any spaceship caught up in such evolutionary processes would be crushed immediately.
Correction: This anomaly is explained within the story. The "planet" has formed by the gravitational effect of the ship attracting a build-up of rocks and debris around the outside of it.