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 213588 - 'Find Usage' gets stuck with 'Initializing Data'
Summary: 'Find Usage' gets stuck with 'Initializing Data'
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: Other Linux
: P2 normal with 2 votes (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 10:04 UTC by tomzi
Modified: 2017-01-31 12:01 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
CPU profiler snapshot (41.27 KB, application/octet-stream)
2012-11-07 12:08 UTC, smil
Details
New snapshot (626.22 KB, application/octet-stream)
2016-04-21 08:31 UTC, ymajoros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2012-06-05 10:04:20 UTC
Sometimes doing 'Find Usage' (classes, methods...) opens the popup and tries to 'Initialize Data' but does not continue at a certain point.

It even often continues with the progress bar to a certain point and then just stops, never continuing.

Product Version = NetBeans IDE 7.2 Beta (Build 201205031832)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_03
Runtime = Java HotSpot(TM) Client VM 22.1-b02
Comment 1 Ralph Ruijs 2012-06-06 10:29:11 UTC
Thank you for the report. Could you attach a cpu profiling snapshot?
http://wiki.netbeans.org/FaqProfileMeNow
Comment 2 smil 2012-11-07 12:08:34 UTC
Created attachment 127297 [details]
CPU profiler snapshot

Dear Netbeans,

I also have the same problem. Sometimes the Find usages just hang... No disk or CPU usage, just waits until I press cancel.

Cheers,

Tamas
Comment 3 smil 2012-11-07 12:10:27 UTC
  Product Version         = NetBeans IDE 7.2 (Build 201207171143) (#b6c037585768)
  Operating System        = Linux version 3.0.0-26-generic running on amd64
  Java; VM; Vendor        = 1.6.0_32; Java HotSpot(TM) 64-Bit Server VM 20.7-b02; Sun Microsystems Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_32-b05
Comment 4 Ralph Ruijs 2015-03-09 12:07:34 UTC
Several focus and threading issues have been fixed in the past releases. If the problem still occurs with a recent NetBeans version, please reopen with steps to reproduce. Thanks!
Comment 5 ymajoros 2016-04-21 08:31:18 UTC
Created attachment 159362 [details]
New snapshot
Comment 6 ymajoros 2016-04-21 08:34:06 UTC
I get this all the time in multiple Netbeans 8.1 installations. I guess some dependencies take time for some reason.

Anyway, it just happens all the time. Restarting "find usages" just after it took minutes to "initialize data" just does it again.

This is making Netbeans somewhat unusable on some projects. Everyone switched from Eclipse to Netbeans, so it's really important for us to have this solved. I'll help as much as I can.

Is there some way to see what's being scanned (or "initialized")?
Comment 7 ymajoros 2016-05-02 12:46:55 UTC
This makes Netbeans almost unusable on our project. Anyway I can help?
Comment 8 Ralph Ruijs 2016-05-05 12:31:15 UTC
(In reply to ymajoros from comment #7)
> This makes Netbeans almost unusable on our project. Anyway I can help?

From the npss it looks like find usages spend a lot of time in the maven indexer but did show some result. Anyway to access this project?
Comment 9 ymajoros 2016-05-09 08:30:44 UTC
Well, it looks like it.

This project is a banking application, so they won't share it. I have some project for another client which has a similar problem. The only thing: I don't want the sources to go public. Is it ok to send it just to you? How can we do this?

Thanks
Comment 10 Ralph Ruijs 2016-06-06 12:47:54 UTC
As part of 255331 the Initialize data stage has been split up and should show better progress. The maven part is being tracked at 252602
Comment 11 ymajoros 2016-06-06 14:05:52 UTC
It still doesn't work for me at this very moment.

I'm willing to collaborate. How can I help reproduce or solve this?
Comment 12 ymajoros 2016-06-06 14:07:44 UTC
Oops, sorry, didn't see your last comment but only the resolution. My bad.

Anyway, 255331 doesn't seem to be related to this???
Comment 13 Ralph Ruijs 2016-06-06 14:15:05 UTC
(In reply to ymajoros from comment #12)
> Oops, sorry, didn't see your last comment but only the resolution. My bad.
> 
> Anyway, 255331 doesn't seem to be related to this???

The fix of 255331 changed how the initializing data stage works.
Comment 14 stevemiles 2016-09-28 20:26:26 UTC
For anyone else running into this problem: I saw it too in Netbeans 8.1. Then I noticed on the find usages dialog an option to select the scope of the find usages action. It was set to "Open Projects and Dependencies" -- basically the widest scope possible. I have several projects open, each with tons of dependencies. So, kinda understandable that it takes a long time to complete... I changed the scope to "Current Project" and the Find Usages completes in just a second or two now.

I don't believe I have ever changed this setting (or it's been a long time). I only ever search for usages in my current project. So, maybe the upgrade to 8.1 reset this to the wider scope?
Comment 15 premek.v 2017-01-31 12:01:52 UTC
(In reply to stevemiles from comment #14)
> It was set to "Open Projects and Dependencies" --

Thank you, with "Open Projects and Dependencies" it takes incredibly long, without dependencies it is ok