see the attached threaddump
Created attachment 88174 [details]
"org.openide.text Document Processing" vs. "AWT-EventQueue-1" - I'll have a closer look.
Created attachment 88347 [details]
GuardedDocument uses extWriteLock/Unlock when adding DrawLayer for a style, which IMO is unnecessary. Even acquiring a
readlock is not neccessary for that matter. See the attached patch. I'll discuss it with Mila next week.
I'm obviously leaving alone the fact that both NbDocument, DocumentLine and GuardedDocument is in this part using long
time deprecated stuff. Plus GuardedDocument implements StyleDocument is now a pure historical artifact. This
implementation must have lost its meaning ages ago with invention of editor annotations...
Since the addStyledLayer() leads to firing of a DocumentEvent we agreed with Vita that we will surround the addStyledLayer() with readLock().