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 176259 - Editor freezes while drawing annotations
Summary: Editor freezes while drawing annotations
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Profile (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Thomas Preisler
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-11-09 08:39 UTC by Alexander Pepin
Modified: 2009-11-24 19:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
treads dump (34.64 KB, text/plain)
2009-11-12 06:49 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2009-11-09 08:39:13 UTC
Steps to reproduce:
- add remote host
- create Fractal sample
- run it
- when execution completes open CPU Hot Spots
- double-click on Mandelbrot in the table (while table is being refreshed)
- click in the editor
Result: Cursor in the editor does not move until annotations appear
Comment 1 Alexander Pepin 2009-11-09 08:42:37 UTC
Drawing annotations (table updating) takes several seconds (5-10) to complete.
Comment 2 Thomas Preisler 2009-11-09 14:03:18 UTC
Fixed at least some of the problems: moved annotation preparation code out of AWT thread and now only the painting is done in AWT. If it is still slow, please reopen and we should have Maria take a look. Perhaps AWT is blocked somewhere else before annotation support gets called.
Comment 3 Alexander Pepin 2009-11-12 04:15:57 UTC
In the latest dev build the editor still freezes (does not respond and does not show annotations) until the details table is fully parsed.
Comment 4 Vladimir Voskresensky 2009-11-12 04:29:10 UTC
Sasha, please, attach thread dump created during freeze.
Comment 5 Alexander Pepin 2009-11-12 06:49:32 UTC
Created attachment 90903 [details]
treads dump

To be precise, now editor freezes until the table is fully parsed if a user right-clicks on the "GlyphGutter"  in the editor (see attached threads dump).
Comment 6 Andrew Krasny 2009-11-12 07:38:02 UTC
Evaluation:

As I already do some changes around, I have looked at this issue...
So, the problem is that updateSource() method of AnnotatedSourceSupportImpl is synchronized (on the object). And, even when it is executed in non-AWT thread, calling ShowTextAnnotationsAction2.hasAnnotations() in AWT thread causes invocation of AnnotatedSourceSupportImpl.getFileAnnotationInfo() which is also synchronized on the same object... 

So IDE freezes..
Comment 7 Thomas Preisler 2009-11-12 15:29:30 UTC
Fixed: now getting info whether pane is annotated or not directly from the pane itself eliminating the need to go through AnnotatedSourceSupportImpl.getFileAnnotationInfo()
Comment 8 Quality Engineering 2009-11-24 19:07:01 UTC
Integrated into 'main-golden', will be available in build *200911241400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9b37fbf6471c
User: Thomas Preisler <thp@netbeans.org>
Log: #176259 -  Editor freezes while drawing annotations