I am told, There's a saying among mathematicians that
"theorems are proved by those who believe them."
Namely, you have to pursue a program of work believing it will be productive. Those who do not think that path will be productive are unlikely to go down that path, and so they will not even get close to proving such theorems. In other words, our work demands a commitment from ourselves, since in general the payoff is unsure and typically it is well in the distance. I can imagine two archetype examples: Andrew Wiles working on the Taniyama-Shimura conjecture for perhaps six or seven years, and Yitang Zhang's work on the distance between consecutive primes. Wiles was a distinguished Princeton professor, where the risks for him would be that the work would not be enough to prove the Fermat Theorem. But along the way, he was making major advances in his field that would have been quite valuable--but not world shaking. Zhang had a lectureship at U of New Hampshire, was in his mid-50s and no particular distinction. But he took what was known in the literature and gave it the power it needed. If it did not work out, I suppose he could have published something, but I am not sure it would have satisfied his desire to do spectacular work or earn him a better position.
As for Zhang, see this article by Andrew Granville, A New Mathematical Celebrity .
If the above link does not work, the link is http://www.ams.org/journals/bull/2015-52-02/S0273-0979-2015-01486-2/S0273-0979-2015-01486-2.pdf
Granville's interesting claim is that there is something distinctive about the mathematics community, since here is an article by an unknown claiming to have proved a major theorem and opening up a new method (the standard recipe for error and "crackpot")--yet it took only three weeks for the major mathematical journal to recognize it and accept it.
As for Wiles, when he first presented his result, after being silent about the work for all those years, someone noted an error in the proof. It was clear the work was important and a major advance, but the big result had a hole in it. Over the next year, Wiles and his student Taylor repaired the hole. This often happens with major complex and lengthy work, and is not stigmatizing if you can repair the hole--you talk about the work to others so they will help you improve the work and find errors in it--that's their job!
It is worth noting