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 255161

Summary: OutOfMemoryError: Java heap space
Product: editor Reporter: pmaselkowski
Component: Parsing & IndexingAssignee: Tomas Zezula <tzezula>
Status: NEW ---    
Severity: normal CC: tmysik
Priority: P4    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 219844
Attachments: stacktrace

Description pmaselkowski 2015-09-10 08:49:22 UTC
Build: NetBeans IDE Dev (Build 201509090002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-b27
OS: Linux

User Comments:
pmaselkowski: Accidentally clicked open project on folder containing all my projects, resulting in creating (?) and opening project containing ~300k files.




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
   at com.sun.java.swing.plaf.gtk.GTKEngine.finishPainting(GTKEngine.java:589)
   at com.sun.java.swing.plaf.gtk.GTKEngine.finishPainting(GTKEngine.java:580)
   at com.sun.java.swing.plaf.gtk.GTKPainter.paintViewportBorder(GTKPainter.java:630)
   at javax.swing.plaf.synth.SynthScrollPaneUI$ViewportBorder.paintBorder(SynthScrollPaneUI.java:255)
   at javax.swing.JComponent.paintBorder(JComponent.java:949)
Comment 1 pmaselkowski 2015-09-10 08:49:24 UTC
Created attachment 156040 [details]
stacktrace
Comment 2 Tomas Hurka 2015-09-10 11:09:50 UTC
The is large (500K) list of Indexable-s. Reassigning to editor/parsing to investigate if it is possible to not to collect all Indexables at once.
Comment 3 Tomas Zezula 2015-09-23 13:30:10 UTC
The problem is not from the real project set up but from the wrongly opened folder.
There is a possibility to hold the file list to examine on disk when they are > some limit. But it will become complicated as they need to be split according to mime types.
Comment 4 pmaselkowski 2015-09-24 08:56:59 UTC
As Tomas Zezula pointed it's not a real project problem.

It's more of a clash with automatic project detection.

For instance:
It' nice feature to have netbeans detect dir as project if it contains known project file, ie. composer.json for PHP projects.
But when such composer.json is lying in ie. dev folder with lot of other project, netbeans would open it as a project.

I don't see any wise solution to detect if it's a project or some garbage file. 

Except that it could show some confirmation if there are no "nbproject" dir - so user could decide to auto init project or not. Currently it automatically create "nbproject" dir.
Comment 5 Tomas Zezula 2015-09-24 11:02:45 UTC
Adding Tomas Mysik (the PHP engineer) on cc.