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 200966 - 10s - MultiViewCloneableEditor.getToolbarRepresentation blocks and waits for editor to initialize
Summary: 10s - MultiViewCloneableEditor.getToolbarRepresentation blocks and waits for ...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
: 205590 (view as bug list)
Depends on: 201751 201823
Blocks: 202242 202681
  Show dependency tree
 
Reported: 2011-08-15 15:43 UTC by Jesse Glick
Modified: 2011-12-05 10:35 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180384


Attachments
nps snapshot (30.26 KB, application/nps)
2011-08-15 15:43 UTC, Jesse Glick
Details
deadlock (34.79 KB, text/plain)
2011-09-09 09:23 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-08-15 15:43:42 UTC
Build: NetBeans IDE Dev (Build 20110815-ff50b2da02e4)
VM: Java HotSpot(TM) Client VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Linux

User Comments:
GUEST: Opened the program

GUEST: When opening 673 lines source from Project firstly

jglick: Switching to an editor tab (text/plain) with some fairly long lines (GR.txt if the file is needed to reproduce).

swilk: I have started IDE about 30 minutes ago, then I have closed all opened files. I have 12 opened PHP projects, most of them with large codebase. 

Then I have switched to browser and IDE stayed idle in background. After about half an hour I focused the Netbeans, clicked throur projects tree and then typed a part of filename to find it in the tree.
When the file was found, I pressed Enter and Netbeans became unresponsive.  
The file wase opened after a few seconds.



Maximum slowness yet reported was 10262 ms, average is 6710
Comment 1 Jesse Glick 2011-08-15 15:43:47 UTC
Created attachment 109986 [details]
nps snapshot
Comment 2 Stanislav Aubrecht 2011-08-16 15:54:02 UTC
MultiViewEditorElement.getToolbarRepresentation() delegates to MultiViewCloneableEditor.getToolbarRepresentation() which initializes the document and waits for something.
Comment 3 Jaroslav Tulach 2011-09-06 08:12:36 UTC
ergonomics#5906c9488e61
Comment 4 Quality Engineering 2011-09-08 14:28:59 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/5906c9488e61
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #200966: Initialize the toolbar only when document is ready
Comment 5 Vladimir Voskresensky 2011-09-09 09:23:05 UTC
Created attachment 110562 [details]
deadlock

fix caused deadlock
Comment 6 Vladimir Voskresensky 2011-09-09 09:24:01 UTC
working with AWT lock from non EDT

"org.openide.text Document Processing" daemon prio=3 tid=0x0a627c00 nid=0x2d waiting for monitor entry [0xaa5ff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.awt.Container.removeAll(Container.java:1214)
        - waiting to lock <0xcabbaff8> (a java.awt.Component$AWTTreeLock)
        at org.netbeans.core.spi.multiview.text.MultiViewCloneableEditor.fillInBar(MultiViewCloneableEditor.java:285)
Comment 7 Vladimir Voskresensky 2011-09-09 09:52:53 UTC
to reproduce deadlock:
leave file opened in IDE
restart IDE
as soon as welcome page is shown try to switch to file tab
Comment 8 Jaroslav Tulach 2011-09-09 10:40:37 UTC
ergonomics#324f5fda7c3a, thanks for the report.
Comment 9 Jaroslav Tulach 2011-09-09 17:40:44 UTC
If anyone wants to back the changes out, go on. Otherwise I can look at the problem on Sunday evening CET.
Comment 10 Jesse Glick 2011-09-09 17:52:37 UTC
Fix backed out in core-main.
Comment 11 Jaroslav Tulach 2011-09-23 10:41:58 UTC
ergonomics#bb3c22be8a00
Comment 12 Quality Engineering 2011-09-24 14:04:14 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/bb3c22be8a00
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: New fix for #200966 which as a by product also fixes #202242
Comment 13 Vladimir Voskresensky 2011-09-26 09:36:25 UTC
Please, revert
http://hg.netbeans.org/cnd-main/rev/bb3c22be8a00

It re-introduces issue #201823
Comment 14 Jaroslav Tulach 2011-09-26 22:59:15 UTC
I don't understand why bb3c22be8a00 should be removed. As far as I can tell in version bb3c22be8a00 C files open with focus.
Comment 15 Vladimir Voskresensky 2011-09-27 08:33:04 UTC
(In reply to comment #14)
> I don't understand why bb3c22be8a00 should be removed. As far as I can tell in
> version bb3c22be8a00 C files open with focus.
Any file opened from Project view does not have focus. 
btw issue #202684 was filed not by me :-)
I found only one way to restore broken functionality - backout bb3c22be8a00

Also backout of bb3c22be8a00 helped to resolve another issue #202681

So, I don't understand why you consider this issue to be resolved if I reverted your fix. But it's up to you.
Comment 16 Jaroslav Tulach 2011-09-27 09:07:04 UTC
I am sorry, but I insist on my fix being correct. I will integrate it again. If you believe there are bugs that will need to be fixed, assign them to me for evaluation.

changeset:   970bfac59d9f
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Tue Sep 27 02:04:29 2011 -0700
summary:     Vladimir reverted bb3c22be8a00 without a good reason. Vladimir's change breaks the MultiViewEditorCreationFinishedTest which has been written per Vladimir's request to ensure that behavior of multiview editor is the same as classical editor provided by openide.text.
Comment 17 Vladimir Voskresensky 2011-09-27 10:35:50 UTC
Jarda, I reverted my backout locally (to check my paranoia) but immediately reproduced  issue #202681, so I still see it as a reason of problems
Comment 18 _ gtzabari 2011-09-29 18:50:33 UTC
See also bug #201823.
Comment 19 Jaroslav Tulach 2011-12-05 10:35:30 UTC
*** Bug 205590 has been marked as a duplicate of this bug. ***