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 248897 - AWT hang caused by endless source parsing
Summary: AWT hang caused by endless source parsing
Status: RESOLVED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 249014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-25 18:25 UTC by _ gtzabari
Modified: 2015-01-05 15:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread-dump (37.77 KB, text/plain)
2014-11-25 18:25 UTC, _ gtzabari
Details
profiler dump (6.38 KB, application/octet-stream)
2014-11-25 18:25 UTC, _ gtzabari
Details
thread dump from 8.0.2 (34.87 KB, text/plain)
2014-12-02 05:36 UTC, _ gtzabari
Details
Profiler dump from 8.0.2 (8.11 KB, application/octet-stream)
2014-12-02 05:38 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2014-11-25 18:25:20 UTC
Created attachment 150700 [details]
thread-dump

I am getting a random IDE hang, both in 8.0.1 and in:

Product Version: NetBeans IDE Dev (Build 201411240001)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

I only bothered investigating in the dev build but I assume this is the same issue. I will attach a thread and a profiler dump. Based on my investigation, org.netbeans.modules.java.source.parsing.JavacParser().getResult() is invoking org.netbeans.api.java.source.ClasspathInfo.toURIs() forever.
Comment 1 _ gtzabari 2014-11-25 18:25:48 UTC
Created attachment 150701 [details]
profiler dump
Comment 2 _ gtzabari 2014-11-25 18:26:50 UTC
Final note: I have no idea which file is causing this because the problem is quite random. It tends to happen when I invoke Fix Imports but it doesn't seem to really matter which Java file I am editing. I get this problem maybe 1-2 times a day.
Comment 3 Svata Dedic 2014-12-01 11:03:54 UTC
*** Bug 249014 has been marked as a duplicate of this bug. ***
Comment 4 Svata Dedic 2014-12-01 14:23:25 UTC
(In reply to _ gtzabari from comment #2)
> Final note: I have no idea which file is causing this because the problem is
> quite random. It tends to happen when I invoke Fix Imports but it doesn't
> seem to really matter which Java file I am editing. I get this problem maybe
> 1-2 times a day.

I assume you've used visualvm to capture profiling stats. Could you please enable profiling of java.* packages, too ? the j.net.URL.toURI is likely to do some SPI callback which causes the slowdown.
Comment 5 _ gtzabari 2014-12-01 17:24:04 UTC
I haven't run into this issue in the past week (even though I have not changed JDK or IDE versions). I'll let you know if I run into it again (and in that case try to collect better profiler dumps).
Comment 6 _ gtzabari 2014-12-02 05:36:29 UTC
Here are updated thread and profiler dumps from Netbeans 8.0.2 final.
Comment 7 _ gtzabari 2014-12-02 05:36:55 UTC
Created attachment 150829 [details]
thread dump from 8.0.2
Comment 8 _ gtzabari 2014-12-02 05:38:54 UTC
Created attachment 150830 [details]
Profiler dump from 8.0.2

I've included java.* packages in the profiler dump as you requested.
Comment 9 Svata Dedic 2014-12-04 13:54:01 UTC
Hm, I hoped that NB code will appear on the call stack, since URI() calls URLStreamHandler at certain point ... but no.
Comment 10 _ gtzabari 2014-12-04 14:47:32 UTC
Svata,

So... what now? :)
Comment 11 Svata Dedic 2015-01-05 15:46:48 UTC
Setting as incomplete: a diagnostic jar was provided offline for 8.0.2 release, defect not reproduced so far. Please reopen when/if you have more info - thanks.