Grab your crankarms and push and pull on the arms. Does the crank move at all? If so, your bottom bracket is worn out or your crank to bottom bracket interface is damaged. Also check that your chainring bolts are tight. Any flex in that area could cause the chain to derail under tension.