if TextEditor::setCaretVisible() is called while the textEditor is NOT enable, then its caret will be destroyed.
The problem is that the caret is not re-created when we enable back the textEditor.
Such a thing can (for example) occurs during a lookAndFeel change when the textEditor is disabled.
So a quick way to reproduce :
textEditor.setLookAndFeel (&newLnf); // will lead to a call to setCaretVisible()
after that the textEditor does not have anymore caret.