Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 213860

Summary: OutOfMemoryError when opening Project in a new userdir
Product: platform Reporter: bht <bht>
Component: Options&SettingsAssignee: Tomas Hurka <thurka>
Status: RESOLVED FIXED QA Contact: issues <>
Priority: P2 CC: mmirilovic, pjiricka
Version: 7.2   
Target Milestone: 7.2   
Hardware: All   
OS: All   
Whiteboard: issue_reviewed
Issue Type: DEFECT Exception Report:
Attachments: log file
heap dump part 1
heap dump part 2
heap dump part 3
heap dump part 4
heap dump part 5
heap dump part 6
heap dump part 7
heap dump part 8
heap dump part 9
heap dump part 10

Description bht 2012-06-08 21:04:15 UTC
Product Version: NetBeans IDE Dev (Build 201206080001)
Java: 1.6.0_31; Java HotSpot(TM) Client VM 20.6-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb)

How to reproduce
- Open NetBeans with a new userdir (Do not import settings)
- Menu|Tools|Options|Miscellaneous|Files|Uncheck "Enable auto-sanning of sources"|OK
- Open the project (from issue 210053)

2 processes are running:
- Activating Java SE
- Opening Projects (10%)

The IDE consumes 100% CPU and runs out of memory quickly
Comment 1 Marian Mirilovic 2012-06-10 17:58:45 UTC
Reassign to performance for evaluation ...
Comment 2 Petr Cyhelsky 2012-06-11 06:43:11 UTC
Works for me with those steps on windows xp, if it is reproducible for you please reopen and attach your messages.log file and heap dump generated by the out of memory error.
Comment 3 bht 2012-06-11 08:45:50 UTC
I can reproduce this every time. Took heap dump at about 200MBytes with VisualVM. It might be possible to get ad dump at higher use, but it is difficult - the longer I wait, the more time it takes because my computer then comes to a halt.

This dump has a compressed size of 45MBytes. I am not member of any upload service. Is it possible that you somehow receive this file?
Comment 4 Petr Cyhelsky 2012-06-11 09:37:45 UTC
if it isn't too great an inconvenience for you, it would be great to let netbeans run until OOME occurs and include THE heap dump generated by the OOME (or if you have one from the last OOME), I think attachment can be up to 50 MB, but I am not sure about it, so please try. Also please attach your messages.log file.
Comment 5 bht 2012-06-11 09:54:10 UTC
I found a heap dump heapdump.hprof.old in the var\log dir that I saved after the OOME. It is 456 MB. This is still 100MB compressed, and the limit for attachments seems to be 15MB. I tried to attach 45 MB but the file was rejected. What would be the best method to send this file?
Comment 6 Tomas Hurka 2012-06-11 09:58:12 UTC
You can try to use
Comment 7 bht 2012-06-11 10:34:48 UTC
They say:

We seem to be having technical difficulty. Please try again in a moment."

This is not doable. If you want the file then you must provide an upload faclity.
Comment 8 Tomas Hurka 2012-06-11 10:43:28 UTC
If you don't want or cannot upload the file somewhere (dropbox, megashare), we cannot find out what is going on. We plan to provide ability to upload heap dumps, but this is not yet ready. Marking as INCOMPLETE until we get the heap dump somehow.
Comment 9 bht 2012-06-11 20:52:15 UTC
Created attachment 120694 [details]
log file
Comment 10 bht 2012-06-11 20:53:44 UTC
Created attachment 120695 [details]
heap dump part 1
Comment 11 bht 2012-06-11 20:55:03 UTC
Created attachment 120696 [details]
heap dump part 2
Comment 12 bht 2012-06-11 20:56:33 UTC
Created attachment 120698 [details]
heap dump part 3
Comment 13 bht 2012-06-11 20:58:02 UTC
Created attachment 120699 [details]
heap dump part 4
Comment 14 bht 2012-06-11 20:59:17 UTC
Created attachment 120700 [details]
heap dump part 5
Comment 15 bht 2012-06-11 21:01:10 UTC
Created attachment 120701 [details]
heap dump part 6
Comment 16 bht 2012-06-11 21:08:45 UTC
Created attachment 120703 [details]
heap dump part 7
Comment 17 bht 2012-06-11 21:10:02 UTC
Created attachment 120704 [details]
heap dump part 8
Comment 18 bht 2012-06-11 21:11:25 UTC
Created attachment 120705 [details]
heap dump part 9
Comment 19 bht 2012-06-11 21:12:29 UTC
Created attachment 120706 [details]
heap dump part 10
Comment 20 bht 2012-06-11 21:14:50 UTC
Heap dump split files were created with 7-zip from a single zip file. Sorry for this. I tried from another computer to upload to senduit - same failure.
Comment 21 Tomas Hurka 2012-06-12 09:16:43 UTC
*** Bug 212687 has been marked as a duplicate of this bug. ***
Comment 22 Tomas Hurka 2012-06-12 09:17:26 UTC
(In reply to comment #20)
> Heap dump split files were created with 7-zip from a
> single zip file.
Thanks for the heap dump. I have it.
Comment 23 Petr Cyhelsky 2012-06-12 09:33:42 UTC
Steps are : start ide with new userdir (with ergonomics) -> do something (anything) in the options -> open some project (web or j2ee is best as it activates a lot of modules) to trigger activation of modules.

As a result the number of instances of
org.netbeans.modules.options.CategoryModel grows exponentially during the activation.
Comment 24 Tomas Hurka 2012-06-12 11:25:32 UTC
Problem is that the head dump contains excessive number of CategoryModel instances. In normal case this number should be close to one and the heap dump contains several thousands and the heap dump from duplicate issue #212687 contains tens of thousands of CategoryModel instances.
Comment 26 Tomas Hurka 2012-06-12 12:36:29 UTC
Fixed in profiler-main

changeset:   224134:f405fb84d227
user:        Tomas Hurka <>
date:        Tue Jun 12 14:23:33 2012 +0200
summary:     bugfix #213860, invoke removeLookupListener()on invalidated CategoryModel instance; do not create new CategoryModel instance when resultChanged() is invoked; make sure getInstance() static method is synchronized
Comment 27 Quality Engineering 2012-06-13 06:10:09 UTC
Integrated into 'main-golden', will be available in build *201206130001* on (upload may still be in progress)
User: Tomas Hurka <>
Log: bugfix #213860, invoke removeLookupListener()on invalidated CategoryModel instance; do not create new CategoryModel instance when resultChanged() is invoked; make sure getInstance() static method is synchronized
Comment 28 Petr Cyhelsky 2012-06-13 09:26:22 UTC
*** Bug 213482 has been marked as a duplicate of this bug. ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo