This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 172857 - Deadlock After pressing Go back to button in editor toolbar
Summary: Deadlock After pressing Go back to button in editor toolbar
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2009-09-23 11:08 UTC by Petr Cyhelsky
Modified: 2009-09-29 14:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ThreadDump (20.46 KB, text/plain)
2009-09-23 11:09 UTC, Petr Cyhelsky
Details
Removing extWriteLock/Unlock (1.22 KB, text/plain)
2009-09-25 11:39 UTC, Vitezslav Stejskal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2009-09-23 11:08:48 UTC
see the attached threaddump
Comment 1 Petr Cyhelsky 2009-09-23 11:09:46 UTC
Created attachment 88174 [details]
ThreadDump
Comment 2 Vitezslav Stejskal 2009-09-25 10:25:40 UTC
"org.openide.text Document Processing" vs. "AWT-EventQueue-1" - I'll have a closer look.
Comment 3 Vitezslav Stejskal 2009-09-25 11:39:18 UTC
Created attachment 88347 [details]
Removing extWriteLock/Unlock
Comment 4 Vitezslav Stejskal 2009-09-25 11:49:13 UTC
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...
Comment 5 Miloslav Metelka 2009-09-29 10:16:51 UTC
Since the addStyledLayer() leads to firing of a DocumentEvent we agreed with Vita that we will surround the addStyledLayer() with readLock().
Comment 6 Vitezslav Stejskal 2009-09-29 14:36:29 UTC
http://hg.netbeans.org/jet-main/rev/74632ab062df