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.setEnabled (false);
textEditor.setLookAndFeel (&newLnf); // will lead to a call to setCaretVisible()
textEditor.setEnabled (true);
after that the textEditor does not have anymore caret.
I think that the problem is that recreateCaret() is calling isCaretVisible() which does not test a shouldCaretBeVisible flag or something, but just test (caret != nullptr)
Since you're already posting about text editor bugs, I should probably mention that DirectWrite isn't rendering properly with the CodeEditorComponent. It's kind of hard to explain what it's doing exactly. When you type, you can only see little marks at the top of the line, but if you go down in the editor then come back up and start typing, it renders correctly. Pretty strange. This is on Windows 10 with VS2015. I know there were some problems with it a while back.