“Memento” is episode twenty of season six of Stargate SG-1.
The X-303 is undergoing trials in orbit, before taking a trip to test its hyperdrive – presumably, the unscheduled trip it took in “Prometheus” and “Unnatural Selection” didn’t really count.
Unfortunately, the ship drops out of hyperspace unexpectedly, and they can’t get it restarted, after they pass through a gravity wave. Although the hyperdrive still works, they have no way of controlling where it will send them, if it’s used for any length of time – and the reactor might go critical. There is no way of fixing it with what they have on board, so they go to a nearby planet in the hopes that they will be able to gate home to pick up the parts. Then the reactor does go critical. Just to make things even better, someone on the planet launches missiles at them.
Some of the people on the planet aren’t terribly friendly, and there is a surprising lack of Goa’uld remains on a planet that has had a stargate.