Does it happen at idle or low RPM speed when cruising at slower speed? Is it at or near a specific RPM range?
Have you taken a multimeter and tested the ignition coil and pickup coil? There is no test for the igniter other than swapping it. Which brings me to my next suggestion. Do you have a friend with a similar bike that you could swap parts around with and see if the problem goes away? Better still is to put your part in his bike and you both go for a ride and see if his bike starts having the problem.
Electrical issues suck.