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 186713 - OutOfMemoryError: Java heap space spellchecker.TrieDictionary$ByteArray.assureCapacity
Summary: OutOfMemoryError: Java heap space spellchecker.TrieDictionary$ByteArray.assur...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Spellchecker (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 09:11 UTC by Alexandr Scherbatiy
Modified: 2010-06-01 12:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
output.txt (230.65 KB, text/plain)
2010-05-26 09:12 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2010-05-26 09:11:30 UTC
My automated tests throw the OutOfMemoryError.
See the attached output file.



    [junit] =============   Test Item: Action====================
    [junit] [palette] Drag and Drop
    [junit] ---- Text to trim ---
    [junit] package testpalette_actions;
    [junit] javafx.scene.control.Button{
    [junit] ---------------------
    [junit] SEVERE [org.openide.util.RequestProcessor]
    [junit] java.lang.OutOfMemoryError: Java heap space
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary$ByteArray.assureCapacity(TrieDictionary.java:417)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary$ByteArray.put(TrieDictionary.java:440)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:394)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.encodeOneLayer(TrieDictionary.java:403)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.constructTrieData(TrieDictionary.java:351)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.constructTrie(TrieDictionary.java:343)
    [junit] 	at org.netbeans.modules.spellchecker.TrieDictionary.getDictionary(TrieDictionary.java:225)
    [junit] 	at org.netbeans.modules.spellchecker.DictionaryProviderImpl.createDictionary(DictionaryProviderImpl.java:168)
    [junit] 	at org.netbeans.modules.spellchecker.DictionaryProviderImpl.getDictionary(DictionaryProviderImpl.java:100)
    [junit] 	at org.netbeans.modules.spellchecker.ComponentPeer$10.lookupDictionary(ComponentPeer.java:655)
    [junit] 	at org.netbeans.modules.spellchecker.ComponentPeer.getDictionary(ComponentPeer.java:447)
    [junit] 	at org.netbeans.modules.spellchecker.ComponentPeer.computeHint(ComponentPeer.java:553)
    [junit] 	at org.netbeans.modules.spellchecker.ComponentPeer.access$100(ComponentPeer.java:119)
    [junit] [catch] at org.netbeans.modules.spellchecker.ComponentPeer$2.run(ComponentPeer.java:158)
    [junit] 	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
    [junit] 	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
    [junit] INFO [org.netbeans.modules.uihandler.Installer]: XX:HeapDumpPath parametter not specified
    [junit] Working directory: D:\Sun\xtest\mercury\javafx\main\javafx.kit\build\test\qa-functional\work\q.j.f.p.J\testPalette
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 210.321 sec
Comment 1 Alexandr Scherbatiy 2010-05-26 09:12:15 UTC
Created attachment 99480 [details]
output.txt
Comment 2 Alexandr Scherbatiy 2010-05-27 12:24:38 UTC

*** This bug has been marked as a duplicate of bug 180668 ***
Comment 3 Alexandr Scherbatiy 2010-05-27 12:30:20 UTC
It seems that it is another issue.
Comment 4 Alexandr Scherbatiy 2010-05-27 12:30:52 UTC
Blocks JavaFX UI tests.
Comment 5 Alexandr Scherbatiy 2010-05-27 13:00:08 UTC
See the exception reporter:
http://statistics.netbeans.org/exceptions/exception.do?id=394914
Comment 6 Jan Lahoda 2010-05-30 20:05:18 UTC
Spellchecker needs some amount of one-time memory to construct its caches, and it appears that it simply does not fit into the memory together with the rest of the IDE. I would suggest to explicitly specify the maximum heap in the project.properties. Anyway, I have changed spellchecker not to construct the dictionary when the current language does not support spellchecker - this will probably work as long as javafx does not support spellchecker:
http://hg.netbeans.org/jet-main/rev/ea93b7a406ef
Comment 7 Quality Engineering 2010-06-01 12:28:05 UTC
Integrated into 'main-golden', will be available in build *201006011333* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ea93b7a406ef
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #186713: do not try to construct dictionary trie if the current language does not provide token list.