This has happened to me before. Fortunately I didn't know what lucid dreams were at the time so I didn't do anything stupid.

It was in the middle of a chemistry class and suddenly I couldn't read anything from the textbook. It only lasted about a minute though so I was fine.