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 247936 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 267323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-14 21:22 UTC by marcoancoro
Modified: 2016-07-27 13:31 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 193281


Attachments
stacktrace (1.21 KB, text/plain)
2014-10-14 21:22 UTC, marcoancoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcoancoro 2014-10-14 21:22:15 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) Client VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Windows 7

User Comments:
marcoancoro: stopped

GUEST: Standard usage. Nothing fancy.

Two PHP projects open. Lots of composer dependencies, so probably a lot of memory there. 

Also had a VM running, so that took some memory, approx 1GB.

System only has 8GB.

GUEST: I dragged a JSON file to the NetBeans shortcut, and though the file is opened normally, there's this exception in the backgorund; I have several plugins installed, including a few 3rd party ones, like the Vagrant plugin, to name the one that's the most recent (and thus the primary suspect for this).

GUEST: The software is constantly blocking waiting for file lock

GUEST: Error while runnng my Java Programm

GUEST: don't know

GUEST: ?

GUEST: i dont know,

GUEST: i ran two maven tasks and worked for about 8 hours with netbeans. Than i closed netbeans without an error message.

GUEST: switching between open file tabs

GUEST: The exception occured while launching Netbeans, I did nothing special. I have currently a J2EE, a Java SE and an HTML5 projetcs opened.




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2271)
   at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
   at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
   at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:122)
   at org.netbeans.modules.editor.url.HyperlinkImpl.readTitle(HyperlinkImpl.java:229)
   at org.netbeans.modules.editor.url.HyperlinkImpl.getTitleImpl(HyperlinkImpl.java:174)
Comment 1 marcoancoro 2014-10-14 21:22:18 UTC
Created attachment 149904 [details]
stacktrace
Comment 2 Tomas Hurka 2016-06-09 11:33:34 UTC
org.netbeans.modules.editor.url.HyperlinkImpl.readTitle() reads whole URL, which is not a good idea. This can cause OOME, when URL contains something large like image or video.
Comment 3 Milutin Kristofic 2016-06-20 14:28:54 UTC
Reading only 10kb http://hg.netbeans.org/jet-main/rev/ec258c2b135a
Comment 4 Milutin Kristofic 2016-07-27 13:31:59 UTC
*** Bug 267323 has been marked as a duplicate of this bug. ***