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 237759 - click on 'Find usages' results hangs up NetBeans
Summary: click on 'Find usages' results hangs up NetBeans
Status: VERIFIED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 13:56 UTC by pm-neti
Modified: 2018-04-04 08:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profiler of 'Find usages' (without clicking on results) (157.20 KB, application/octet-stream)
2013-10-29 13:56 UTC, pm-neti
Details
thread dump before freeze (16.10 KB, application/octet-stream)
2013-10-29 14:48 UTC, pm-neti
Details
thread dump after freeze (17.76 KB, application/octet-stream)
2013-10-29 14:49 UTC, pm-neti
Details
thread dump during freeze (generated with VisualVM 1.3.6) (16.87 KB, application/octet-stream)
2013-10-29 15:19 UTC, pm-neti
Details
Sample buggy project (155.86 KB, application/zip)
2013-10-31 10:49 UTC, pm-neti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pm-neti 2013-10-29 13:56:33 UTC
Created attachment 141642 [details]
profiler of 'Find usages' (without clicking on results)

When you select use 'find usages' on a php class you get results groupped by file.
When you click on a found element (that is pointing to certain line) in a file that is already open in NetBeans then it works ok.

But when you click on a result from unopened file, it hangs up NetBeans and it needs to be restarted (it's completly unresponsive, even if it's CPU usage is <5%, you can't even stop a profiler).

Instead, when you first click on file-group in Usages result-window to open that file, and then click on result from that file, then its displayed correctly.
Comment 1 pm-neti 2013-10-29 14:03:02 UTC
PS I'm working on a mapped network drive and in NetBeans 7.3.1 that works ok.
Comment 2 Ondrej Brejla 2013-10-29 14:04:25 UTC
Sorry, can't reproduce that in the dev build. Make a thread dump, thanks.

Product Version: NetBeans IDE Dev (Build 20131029-419b4aea302e)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.11.0-12-generic running on i386; UTF-8; cs_CZ (nb)
Comment 3 pm-neti 2013-10-29 14:48:39 UTC
Created attachment 141646 [details]
thread dump before freeze
Comment 4 pm-neti 2013-10-29 14:49:07 UTC
Created attachment 141647 [details]
thread dump after freeze
Comment 5 Ondrej Brejla 2013-10-29 14:51:11 UTC
Hmm...no PHP class inside. Can you make thread dump "during" freeze? Thanks.
Comment 6 pm-neti 2013-10-29 15:19:33 UTC
Created attachment 141649 [details]
thread dump during freeze (generated with VisualVM 1.3.6)

netbeans is still freezed (clicking NB icon doesn't bring up window)
Comment 7 Ondrej Brejla 2013-10-30 16:28:04 UTC
Sorry, but there is no php class in any dump :/
Comment 8 pm-neti 2013-10-31 07:52:30 UTC
Have a look at this screencast:
http://screencast.com/t/OUjo7xbKi9O
From ~0:20 NetBeans became unresponsive to any user actions.
Comment 9 Ondrej Brejla 2013-10-31 08:47:32 UTC
I saw that "scanning in progress" dialog before find usages. Is that class really lbig, where you try to use find usages? It seems to be.
Comment 10 Ondrej Brejla 2013-10-31 08:50:17 UTC
Probably it will be related to issue #236693. Can you download the latest dev build and try it there [1]? Thanks. And can you attach (or send me privately to email) that buggy project? It would help us a lot.

[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 11 Ondrej Brejla 2013-10-31 08:50:56 UTC
Imho it has to work in the dev build.
Comment 12 pm-neti 2013-10-31 10:47:42 UTC
(In reply to Ondrej Brejla from comment #11)
> Imho it has to work in the dev build.

In bightly build "scanning in progress" doesn't appear, but it hangs up as well:
http://screencast.com/t/VNDk8eN4p
Comment 13 pm-neti 2013-10-31 10:49:57 UTC
Created attachment 141735 [details]
Sample buggy project

Project size doesn't matter. NB hanhs up even on small projects.
Comment 14 Ondrej Brejla 2013-10-31 12:05:21 UTC
I tried that locally and without freeze, everything works properly. So the only think what could make problems seems to be that networks drive. Can you try to test it on local drives? To make new project locally and try find usages there?
Comment 15 luba 2013-10-31 12:59:02 UTC
Same happens to me too. Except that Netbeans hangs right after usages are found. And i'm on a local drive.

Tested on

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/lm/Library/Application Support/NetBeans/7.4
Cache directory: /Users/lm/Library/Caches/NetBeans/7.4

and

Product Version: NetBeans IDE Dev (Build 201310300001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/lm/Library/Application Support/NetBeans/dev
Cache directory: /Users/lm/Library/Caches/NetBeans/dev
Comment 16 pm-neti 2013-10-31 13:16:48 UTC
I have created new local project and the NB freezed as usual so it isn't network drive issue.
Comment 17 Ondrej Brejla 2013-10-31 13:26:36 UTC
Hmm, really strange...we tried it on many machines and no problem occured :/ Can't do anything with that right now, the only things what can help us are thread dumps when the ide is frozen. So if you can, just attach them. Can't do anything else :( Will try to investigate it more. Thanks.
Comment 18 Ondrej Brejla 2013-12-03 10:26:39 UTC
Again tried that in 7.4 and no issue occured. I tried that sample project as well and everything worked.

Can you try it in the latest dev build? Thanks.

Reassigning (not sure where), since there is no PHP class in thread dumps then I can't evaluate anything :/ Ralph, what do you think? Thanks.
Comment 19 luba 2013-12-03 10:32:30 UTC
Still happening for me in newest dev build:

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/lm/Library/Application Support/NetBeans/7.4
Cache directory: /Users/lm/Library/Caches/NetBeans/7.4
Comment 20 luba 2013-12-03 10:56:10 UTC
Sorry I pasted from the wrong NB version, my specs are of course:

Product Version: NetBeans IDE Dev (Build 201312030002)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/lm/Library/Application Support/NetBeans/dev
Cache directory: /Users/lm/Library/Caches/NetBeans/dev

Yet still the same. Usages are found. Right after the show up the spinning wheel appears ... and spins forever.
Comment 21 Ralph Ruijs 2013-12-03 10:59:15 UTC
Both thread dumps get stuck in rectangular selection's action, reassigning to editor-actions. Please evaluate, thanks!
Comment 22 luba 2013-12-12 14:53:26 UTC
Just had a nice surprise today: After updating from OSX Lion to Mavericks yesterday, the "Find Usages"-function works now. I'll keep you posted if encounter the problem again.
Comment 23 Scrublet 2013-12-24 13:32:57 UTC
I'm not sure this is a 7.4 issue. I just started seeing this problem yesterday. Here is my environment:

Product Version: NetBeans IDE 7.3 (Build 201306052037)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.9.1 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/bradleysnyder/Library/Application Support/NetBeans/7.3
Cache directory: /Users/bradleysnyder/Library/Caches/NetBeans/7.3

That being said, I have verified that NetBeans hangs in 7.3, 7.4, and the current dev build. It used to work on this computer, so it seems like NetBeans is getting caught on some other OS-related thing.
Comment 24 Martin Balin 2016-07-07 07:28:30 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 25 delugach 2018-01-31 03:32:31 UTC
I know this is an old thread, but I'm getting the same behavior as was reported in 2013. "Find Usages" hangs. 

MacOS 10.13.3
NB 8.2 (Build 201609300101) updated to Patch 2. 

My Java version is:

Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

...although I experienced the same behavior under 161. 

I have reinstalled NB, and Java more than once, with no effect on this bug.
I have deleted both the Cache and Application Support folders for Netbeans, with no effect.

Are there any others experiencing this behavior recently?

BTW, this is my first bug report. I hope I'm in the right place.
Comment 26 delugach 2018-02-19 16:44:46 UTC
On the Mac, the Find Usages bug (hang) is experienced with JDK 1.8.0_161 and JDK 1.8.0_162. Reverting back to JDK 1.8.0_151 restores the correct behavior. The workaround is therefore to delay upgrading to 161/162 until a future version fixes the problem.
Comment 27 ksilz 2018-04-04 08:24:00 UTC
I can confirm that "Find Usages" for a Java method hangs Netbeans on MacOS 10.13.4 with both JDK 1.8.0_162 and  1.8.0_152, requiring a hard kill of Netbeans. It works fine with JDK 1.8.0_151.

There may be other areas Java where this bug shows, too - such as "Refactor - Push down" which I hit by accident and which also hung (or it may have just taken a long time to complete, don't know).