FR 8393 then FR 1786 at Barcelona
Budapest → Barcelona → Vilnius
Timetable, Barcelona time
20:00FR 8393 from Budapest at the gate
16:10FR 1786 to Vilnius leaves the gate
20 h 10 apart on the timetable, overnight
FR 1786 leaves 20 h 10 after FR 8393 arrives on the timetable: more than half a day, so not a connection we count.