Stargate SG-1: Season 4, Episode 12
A test gone wrong leaves Jack and Teal'c marooned in space aboard a damaged prototype attack ship