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 188809

Summary: OutOfMemoryError: Java heap space
Product: php Reporter: karel_barel <karel_barel>
Component: Formatting & IndentationAssignee: Petr Pisl <ppisl>
Status: VERIFIED FIXED    
Severity: normal CC: karel_barel, nysander, tmysik, troodon, vriha
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 153367
Attachments: stacktrace

Description karel_barel 2010-07-21 06:12:02 UTC
Build: NetBeans IDE Dev (Build 201007210001)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
GUEST: in a php file, type 'if' followed by tab.

GUEST: IT HAPPENS EVERYTIME I RUN THIS APPLICATION

AUTOCOMPLETE FEATURES ARE SCREWED BECAUSE OF THIS

karel_barel: trying to expand template




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.lang.String.substring(String.java:1939)
   at org.netbeans.modules.php.editor.indent.FormatVisitor.addFormatToken(FormatVisitor.java:1060)
   at org.netbeans.modules.php.editor.indent.FormatVisitor.visit(FormatVisitor.java:919)
   at org.netbeans.modules.php.editor.parser.astnodes.Program.accept(Program.java:92)
   at org.netbeans.modules.php.editor.indent.TokenFormatter$1.run(TokenFormatter.java:354)
   at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314)
Comment 1 karel_barel 2010-07-21 06:12:07 UTC
Created attachment 100945 [details]
stacktrace
Comment 2 Tomas Mysik 2010-07-21 07:41:01 UTC
P2
Comment 3 Petr Pisl 2010-09-03 12:49:41 UTC
I have eliminate all possible known situation, when can this happen. Also I have add an assertion, that should help to find out the rest of cases.
Comment 4 Quality Engineering 2010-09-04 03:44:32 UTC
Integrated into 'main-golden', will be available in build *201009040000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e4b07cf0e6ea
User: Petr Pisl <ppisl@netbeans.org>
Log: #188809 - OutOfMemoryError: Java heap space

This is not the fix. It's trying aliminating the possibility to add more format text tokens for one lexer token. Also adds new assertion that will throwed when one lexer token is added processed two times.
Comment 5 Petr Pisl 2010-11-02 10:48:03 UTC
*** Bug 191502 has been marked as a duplicate of this bug. ***
Comment 6 Vladimir Riha 2011-07-27 10:15:46 UTC
Verified, issue described by karel_barel is not reproducible

Product Version: NetBeans IDE 7.0.1 (Build 201107211357)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)