This is a frustrating level, however it is not a glitch. If the chocolate eats one of your check marks you can not win the game. When that happens you get the error and immediate end game. You can always use the lucky candy booster then the game won't stop after a check mark is taken.
This happens due to chocolate eating one of your check marks, you don't have any extra lucky candy..way to prevent this is to use the lucky candy booster.
If you allow the chocolate to eat your check marks you can not win the game and this immediately ends your game. This level has no extra lucky candy so it is easier to use a lucky candy booster.