It's an addon. Turn your addons off.
I replicated this several times, both getting the crash/getting locked out (because the game would crash every time I logged back in), and undoing the crash and being able to log back into characters that had crashed.
I don't know which addon it is, though. I thought it might be Lazy Writ Crafter because it activates at the Scribing table, but I tested that one and couldn't get another crash. Anyone have another idea?
The crash happens exactly when or immediately after hitting Scribe on a new spell for the first time. The game fully crashes to desktop, and will thereafter crash each time you try to log in on that character until the culprit addon is turned off.