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 249164

Summary: OutOfMemoryError: Java heap space
Product: updatecenters Reporter: jeremyclassic
Component: PluginportalAssignee: vralfy
Status: NEW ---    
Severity: normal CC: corretge, DaviMoreira
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 203575
Attachments: stacktrace
stacktrace
stacktrace

Description jeremyclassic 2014-12-06 04:01:44 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17
OS: Mac OS X

User Comments:
jeremyclassic: editing a file. I committed something in sourcetree, walked away and came backt to this...

GUEST: don't know.




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:3332)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:622)
   at java.lang.StringBuilder.append(StringBuilder.java:202)
   at de.foopara.phpcsmd.generics.GenericProcess.run(GenericProcess.java:72)
Comment 1 jeremyclassic 2014-12-06 04:01:46 UTC
Created attachment 150931 [details]
stacktrace
Comment 2 Tomas Hurka 2015-02-04 08:21:32 UTC
OOME is caused by the following error in PHP_CodeSniffer library:

Notice: Undefined index: scope_closer in /usr/local/Cellar/php-code-sniffer/1.5.5/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php on line 253

possible solution is to update PHP_CodeSniffer to current version 2.2.0 or edit NonExecutableCodeSniff.php and use "@" for suppressing this notice. 

OOME is cause by three large char arrays (150M, 150M, 75M) all full of above 'Notice' text. Those arrays are output from external process executed by de.foopara.phpcsmd
 plugin. Reassigning to updatecenters/pluginportal.
Comment 3 Jiri Kovalsky 2015-02-04 13:16:10 UTC
Norman, can you please take a look at this issue? Thanks!

Jeremy, Norman did some bug fixing in his plugin's repository in Spring 2014, so if you want you can install this unsigned build of the PHPCSMD plugin: https://netbeans.org/bugzilla/attachment.cgi?id=150588 - see issue #246316 for more details. Maybe you will not encounter this OOME again.
Comment 4 Exceptions Reporter 2015-04-16 06:37:28 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203575
Comment 5 corretge 2015-05-04 08:24:30 UTC
Created attachment 153508 [details]
stacktrace

phpcs last version
Comment 6 DaviMoreira 2016-02-18 14:13:50 UTC
Created attachment 158555 [details]
stacktrace

Maybe it's related to something that happened yesterday on my machine, when I've tried to close the IDE without finishing it's projects scanning.