[ 
https://issues.apache.org/jira/browse/NETBEANS-4696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17190415#comment-17190415
 ] 

Ernie Rael commented on NETBEANS-4696:
--------------------------------------

I went back and looked at removing the dependency from javascript2.knockout to 
projectuiapi.base. I had left in 

{code:java}
if (!OpenProjects.getDefault().openProjects().isDone()) {
    return null;
}
{code}

I took that out (it was before QuerySupport stuff) and it made no difference. 
The code is now
{code:java}
KnockoutIndex index = INDEXES.get(project);
if (index == null) {
    Collection<FileObject> sourceRoots = QuerySupport.findRoots(project,
            null /* all source roots */,
            Collections.<String>emptyList(),
            Collections.<String>emptyList());
    QuerySupport querrySupport = QuerySupport.forRoots(
            KnockoutIndexer.Factory.NAME,
            KnockoutIndexer.Factory.VERSION,
            sourceRoots.toArray(new FileObject[]{}));
    index = new KnockoutIndex(querrySupport);
    if (sourceRoots.size() > 0) {
        INDEXES.put(project, index);
    }
}
return index;
{code}

With the early return left out, until the project is open, sourceRoots.size() 
is 0 until the open completes. Updating the PR to remove the dependency.


> NetBeans 12.1-beta1 sometimes hangs on open
> -------------------------------------------
>
>                 Key: NETBEANS-4696
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4696
>             Project: NetBeans
>          Issue Type: Bug
>          Components: ide - Performance
>    Affects Versions: 12.1
>         Environment: Linux (Debian "Buster")
> OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
>            Reporter: Glenn Holmer
>            Priority: Blocker
>              Labels: deadlock, pull-requests-available
>         Attachments: 12.1-vc1-thread-dump-orac.txt, 
> nb12.1-beta1-thread-dump.png, nb12.1-beta1-thread-dump.txt, 
> netbeans-12.1-thread-dump.txt
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
>  
> NetBeans sometimes hangs on startup; the symptom is a stalled "Opening 
> Projects" progress bar. I haven't been able to find a repro case, but I'm 
> attaching a thread dump (from VisualVM) and screen shot.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to