Actually not sure, when. Firstly got AE from issue 111068, then quite soon got this deadlock (presumably). Attaching
Created attachment 45758 [details]
I am not sure what exactly went wrong, but the problem seems to be in CloneableEditorSupport in document reloading. All
threads are apparently waiting on the document to be reloaded, but no other thread seems to be loading it. It could be a
side effect of #111068.
Thread "Default RequestProcessor" (tid=0x95d6c400) would like to load the document everybody is waiting for, but it
can't as it needs write access to the document, but the thread "HintsController worker" (tid=0x9689a000) keeps read access.
There was no reload happening ("HintsController worker" found status=DOCUMENT_NO), but AnnotationsHolder (few stack
frames earlier) somehow obtained the reference to the document being loaded.
That means that HintsControllerImpl.setErrorsImpl():103 maintained to sucessfully get AnnotationsHolder instance
with proper doc set (that is, editorCookie.getDocument() passed), yet finds no doc/DOCUMENT_NO a while later (even under
doc's read access.
I still don't fully understand how can this happen.
Ih, now I see. This is clearly a consequence of issue 111068, but we need to make CES more robust.
The reloading task failed (actually just one of the document listeners fired an Error), but the internal structures were
left inconsistent (doc != null while status == DOCUMENT_NO).
There should be two fixes:
1. Clear the doc field if the loading effort led to DOCUMENT_NO (to prevent this deadlock)
2. (optional) Survive errors from listeners, keep on reloading.