It's a really common fault with these bikes. The 1998-2003 bikes have an inherent 2nd gear weakness. And once they start slipping out, the dogs wear more and more each time it happens and it gets progressively worse.
I just bought my 2001 model too. It is very tidy but has 44,000kms on the clock. I didnt know about this fault before I bought my bike, and didnt give it a good enough thrash in second gear on my test ride for the fault to show up. But more than half throttle over 4000 RPM... and she pops out.
The engine needs to come out, be turned upside down on a bench, and the sump + lower crankcase-half removed to get to the gearbox out.
The fix to stop it happening again is to have the new gears undercut before re-assembly, like Yamaha should have in the first place.
I actually cant believe the gearbox fix is not a sticky here already.