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 237243

Summary: OutOfMemoryError: Java heap space
Product: php Reporter: Exceptions Reporter <exceptions_reporter>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dancchamm, jhavlin
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 204666
Attachments: stacktrace

Description Exceptions Reporter 2013-10-17 11:01:37 UTC
This issue was reported manually by jhavlin.
It already has 1 duplicates 


Build: NetBeans IDE 7.4 Beta (Build 201307092200)
VM: OpenJDK 64-Bit Server VM, 23.7-b01, OpenJDK Runtime Environment, 1.7.0_25-b30
OS: Linux

User Comments:
GUEST: svn update




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOfRange(Arrays.java:2694)
   at java.lang.String.<init>(String.java:203)
   at java.lang.String.substring(String.java:1913)
   at java.io.File.getParent(File.java:453)
   at java.io.File.getParentFile(File.java:473)
   at org.netbeans.modules.masterfs.filebasedfs.utils.FileInfo.getRoot(FileInfo.java:190)
Comment 1 Exceptions Reporter 2013-10-17 11:01:39 UTC
Created attachment 141203 [details]
stacktrace
Comment 2 Jaroslav Havlin 2013-10-17 11:05:22 UTC
Many instances of LexerState:
 o.n.m.php.editor.lexer.PHP5ColoringLexer$LexerState
 1 380 865 (11,6%) instances, 142 652 426 (18%) bytes retained size
Maybe problem in PHP, maybe just more memory is needed.

Reassigning to PHP. Please evaluate. Thanks.
Comment 3 Ondrej Brejla 2013-11-19 10:39:17 UTC
*** Bug 238042 has been marked as a duplicate of this bug. ***
Comment 4 Ondrej Brejla 2013-11-19 13:08:44 UTC
Each lexer state has a copy of state stack. It's needed because lexer moves up/down through its states and some states don't have just one parent state, so one can't simply use yybegin() Flex instruction...popState() has to be used. And probably the problem will be somewhere in use of "svn update" on some really big files...lexer is used a lot and there is not enough memory. But I'm not able to simulate that even if I use big projects :(( I tried a lot of projects and without success.