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 257779 - Find Usages hangs AWT thread
Summary: Find Usages hangs AWT thread
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Ralph Ruijs
Depends on:
Reported: 2016-01-31 05:14 UTC by _ gtzabari
Modified: 2016-02-11 14:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

messages.log (559.89 KB, application/octet-stream)
2016-01-31 05:14 UTC, _ gtzabari

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2016-01-31 05:14:06 UTC
Created attachment 158308 [details]

Product Version: NetBeans IDE Dev (Build 201601210002)
Updates: Updates available
Java: 1.8.0_71; Java HotSpot(TM) 64-Bit Server VM 25.71-b15
Runtime: Java(TM) SE Runtime Environment 1.8.0_71-b15
System: Windows 10 version 10.0 running on amd64; UTF-8; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

It seems that Find Usages is invoking an expensive task on the AWT thread. If a user invokes Find Usages twice (the second time while the first search is still ongoing) the entire IDE hangs until the search completes. If you search for a very common method, such as Object.hashCode() the IDE hangs for quite a while.

Repro steps:
1. Open Java project
2. Invoke Find Usages (ALT-F7) on a class that implements hashCode()
3. Start the search from Object.hashCode()
4. Before the operation can complete, hit ALT-F7 again.
5. The IDE will hang for 20 seconds, until the Find Usages operation completes and the second Find Usages dialog can come up.
6. messages.log contains this warning which might be relevant:

WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by:$

I am attaching the full messages.log for your review.