Aston Martin's Lance Stroll and Alpine's Pierre Gasly both went off the track during P3 at the Spanish Grand Prix.