An idiom describing a situation where one does great at a subject, until near the end.
Note : To stay true to the meaning, the mistake has to have a great detrimental effect their overall performance.
Jake : Wow, Samantha is an amazing student! She has perfect attendance, she always seems to have the right answers, she turns in her homework everyday, and she aces all of the quizzes.
Tammy : Yeah, but didn't you hear? She completely failed the finals. She totally tripped at the finish line!
And dying in yo' bed many years from now, would ya be willing ta trade all da days from dis here day ta dat fo' one chance, just one chance, ta come back here as young men an' tell our enemies dat dey may take our lives but dey will never take our freedom ... YUB NUB!