I agree with the suggestion of some kind of interuption from the kill switch, lean angle cut out switch or clutch sensor etc as it stops when you pick first gear. Does it have a fuel pump or is it just gravity fed. Im not familiar with the model of bike and what saftey switches it has. It doesnt sound terminal though.

If it can select first and it cuts out when you ride it along then its too much air getting in as also suggested, perished rubbers certainly sound like the most likely cause. I removed the air box from a 1200 bandit and stuck on the K&N cones on the back of the carbs and it got way too much air and cut out at 5mph hehe