Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Out of memory exception when doing JDT search
Out of memory exception when doing JDT search [message #510174] Tue, 26 January 2010 10:47 Go to next message
Eclipse UserFriend
Hi,

Currently we have code calling JDT search to find annotations from a workspace, but we got OOME with the stack likes below,
We create our search pattern by calling:
"SearchPattern.createPattern(fullyQualifiedAnnotationName, IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.REFERENCES, SearchPattern.R_EXACT_MATCH)" for some annotations, and using a requestor for holding the result. calling "searchEngine.search(searchPattern, new SearchParticipant []{SearchEngine.getDefaultSearchParticipant()}, scope, requestor2, monitor)" to do the search. The Heap Analyzer shows that the "PossibleMatch" and "BufferManager" are holding most of memory (1G and 400mb), does anyone know what happened here? does JDT has any debug code can be used to show the details? solutions? Thanks for the help.

java.lang.OutOfMemoryError
at org.eclipse.jdt.internal.compiler.lookup.MethodScope.<init>(Unknown Source)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildMet hods(Unknown Source)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildFie ldsAndMethods(Unknown Source)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScop e.buildFieldsAndMethods(Unknown Source)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.c ompleteTypeBindings(Unknown Source)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.l ocateMatches(Unknown Source)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.l ocateMatches(Unknown Source)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.l ocateMatches(Unknown Source)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.l ocateMatches(Unknown Source)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findM atches(Unknown Source)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.searc h(Unknown Source)
at org.eclipse.jdt.core.search.SearchEngine.search(Unknown Source)
Re: Out of memory exception when doing JDT search [message #510177 is a reply to message #510174] Tue, 26 January 2010 10:52 Go to previous messageGo to next message
Eclipse UserFriend
Le 2010-01-26 10:47, Benson Ning a écrit :
> Currently we have code calling JDT search to find annotations from a
> workspace, but we got OOME with the stack likes below,
> We create our search pattern by calling:
> "SearchPattern.createPattern(fullyQualifiedAnnotationName,
> IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.REFERENCES,
> SearchPattern.R_EXACT_MATCH)" for some annotations, and using a
> requestor for holding the result. calling
> "searchEngine.search(searchPattern, new SearchParticipant
> []{SearchEngine.getDefaultSearchParticipant()}, scope, requestor2,
> monitor)" to do the search. The Heap Analyzer shows that the
> "PossibleMatch" and "BufferManager" are holding most of memory (1G and
> 400mb), does anyone know what happened here? does JDT has any debug code
> can be used to show the details? solutions? Thanks
It looks like a leak. Please open a bug report against JDT/Core with
steps to reproduce and build id.
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT
Thanks.
--
Olivier
Re: Out of memory exception when doing JDT search [message #510198 is a reply to message #510174] Tue, 26 January 2010 11:37 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the reply. Sorry, I don't have particular steps for the scenario, just to make the code above to be called for the workspace (do the search, I was using eclipse 3.4.2), I am not sure if that's sufficient for the developer to debug the accumulation for the simple scenario.
Re: Out of memory exception when doing JDT search [message #510236 is a reply to message #510198] Tue, 26 January 2010 14:54 Go to previous message
Eclipse UserFriend
Le 2010-01-26 11:37, Benson Ning a écrit :
> Thanks for the reply. Sorry, I don't have particular steps for the
> scenario, just to make the code above to be called for the workspace (do
> the search, I was using eclipse 3.4.2), I am not sure if that's
> sufficient for the developer to debug the accumulation for the simple
> scenario.
Could you please open a bug report? I think we need it just to keep a
trace of this problem.
Please also provide the code snippet that you are using and we will
investigate.

Thanks,
--
Olivier
Previous Topic:How to delete physically all CVS files and dirs ?
Next Topic:HELP ME ABOUT nWire
Goto Forum:
  


Current Time: Sun Mar 16 23:00:33 EDT 2025

Powered by FUDForum. Page generated in 0.04505 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top