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 208583 - Scanning in progress is stuck
Summary: Scanning in progress is stuck
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on: 212326
Blocks:
  Show dependency tree
 
Reported: 2012-02-17 16:59 UTC by Jiri Prox
Modified: 2012-05-30 08:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (7.32 MB, application/x-compressed)
2012-02-17 16:59 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2012-02-17 16:59:32 UTC
Created attachment 115890 [details]
sample project

Scanning never finished, although it is not indicated by progress bar in the bottom right corner of the IDE. This blocks all refactoring.

Steps to reproduce:
1) open attached project (projectized jEditor)
2) run single Inspection (If-Else must use braces) from Inspect & transform on the whole project

-> there appear several messages that file x.y was changed to readonly. Maybe, this is the point where it all goes wrong

3) undo refactoring

-> from now on 'Scanning in progress' is always shown when trying to run Refactoring, but it is not indicated by progress bar.

I've managed to reproduce it 3 times in a row


Product Version: NetBeans IDE Dev (Build 201202150400)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 1 Jan Lahoda 2012-05-09 12:17:47 UTC
Does this still happen? I don't think I have ever seen this, but maybe I did not try hard enough? Thanks.
Comment 2 MackSix 2012-05-09 22:54:35 UTC
I have no problem with this unless I set memory down to:

-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=64m

1) Then the initial scanning of the project takes a long time, but it finishes. 2) Then I can run Inspect and Transform>>If-Else must use braces. The refactor window comes up and I press the Refactor button and it finishes. This all takes a long time, with memory restriction, but it finishes.
3) Then I see some scanning going on, but I can click the Undo button and it works.
4) Then I see "Checking for external changes" progress bar and is says "Suspended" on the progress bar.
5) I try to run Inspect & Transform>>If-Else must use braces, but it says "Please wait, classpath scanning in progress... This seems to take forever and finally the Inspect and Transform dialog pops up, but the "Checking for external changes" progress bar is still up with "Suspended" on the progress bar.
6) Eventual the "Checking for external changes" progress bar goes away, but I thought it would never end.
7) I try the Inspect and Transform again, and it seemed to lock up and I tried to cancel. Nothing happened and then whilst typing this, this was thrown:

An error occurred during parsing of 'C:\Users\Mark\Documents\NetBeansProjects\JEditor\src\org\gjt\sp\jedit\gui\FloatingWindowContainer.java'. Please report a bug against java/source and attach dump file 'C:\Users\Mark\AppData\Roaming\NetBeans\dev20120509\var\log\FloatingWindowContainer.dump'.

Log file says Out of Heap Space, so it is not surprising.

I have no problems with this and:

-J-Xms64m -J-Xmx512m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m
Comment 3 MackSix 2012-05-09 23:03:09 UTC
Product Version: NetBeans IDE Dev (Build 201205090400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

I have no problems doing this with this either:

-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=64m

I have never tested with a project this big before. This will come in handy to test other things.
Comment 4 Jan Lahoda 2012-05-10 06:40:30 UTC
Thanks for testing. I would not recommend to mess with the permgen size (with max permgen == 64MB, IDE crashes during project open on out-of-permgen for me). Project opening (and consequent scanning) is not particularly slow for me for -J-Xmx128m (about 23 seconds). I&T to the If-Else is slow as the memory is tight. Seems that many Documents are held in memory, which I will need to investigate.
Comment 5 Jan Lahoda 2012-05-30 08:00:33 UTC
The fix for bug #212326 makes the hint processing itself less memory consuming - won't help much for Inspect&Transform, but should help a lot for Source/Inspect (cf. bug #213182). For I&T, I don't see much room for improvements, the refactoring infrastructure must open the documents to find out if there are guarded blocks in them. The memory requirements of I&T shouldn't be much different from memory requirements of the Rename refactoring that would change the same files.

Anyway, I hope the problem with the stuck scanning does not manifest itself anymore, so hopefully fixed. Thanks.