Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350271 - dependency auto complete can kill eclipse
Summary: dependency auto complete can kill eclipse
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Milos Kleint CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 350568
Blocks:
  Show dependency tree
 
Reported: 2011-06-24 10:21 EDT by James Nord CLA
Modified: 2021-04-19 13:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Nord CLA 2011-06-24 10:21:06 EDT
Build Identifier: Indigo release

when in the pom editor I managed to kill eclipse by trying to get the search to look for oracle jdbc drivers.

I attempted to do this by typing '*or' in the groupId (in the XML mode of the pom editor).

The ui locked up then after a while I got a message saying something bad had happened and I should restart eclipse.
In the log I get
java.lang.OutOfMemoryError: Java heap space
	at java.nio.CharBuffer.wrap(Unknown Source)
	at java.nio.CharBuffer.wrap(Unknown Source)
	at java.lang.StringCoding$StringDecoder.decode(Unknown Source)
	at java.lang.StringCoding.decode(Unknown Source)
	at java.lang.String.<init>(Unknown Source)
	at org.apache.lucene.store.IndexInput.readString(IndexInput.java:125)
	at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:357)
	at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:197)
	at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:733)
	at org.apache.lucene.index.MultiSegmentReader.document(MultiSegmentReader.java:259)
	at org.apache.lucene.index.MultiReader.document(MultiReader.java:216)
	at org.apache.lucene.index.IndexReader.document(IndexReader.java:637)
	at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:91)
	at org.apache.lucene.search.Hits.doc(Hits.java:180)
	at org.apache.maven.index.DefaultIteratorResultSet.createNextAi(DefaultIteratorResultSet.java:184)
	at org.apache.maven.index.DefaultIteratorResultSet.next(DefaultIteratorResultSet.java:143)
	at org.apache.maven.index.DefaultIteratorResultSet.next(DefaultIteratorResultSet.java:48)
	at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.search(NexusIndexManager.java:492)
	at org.eclipse.m2e.core.internal.index.nexus.NexusIndex.find(NexusIndex.java:118)
	at org.eclipse.m2e.core.internal.index.nexus.NexusIndex.find(NexusIndex.java:89)
	at org.eclipse.m2e.core.internal.index.nexus.CompositeIndex.find(CompositeIndex.java:74)
	at org.eclipse.m2e.core.internal.index.filter.FilteredIndex.find(FilteredIndex.java:57)
	at org.eclipse.m2e.core.ui.internal.search.util.IndexSearchEngine.findGroupIds(IndexSearchEngine.java:111)
	at org.eclipse.m2e.editor.xml.PomTemplateContext$2.addTemplates(PomTemplateContext.java:159)
	at org.eclipse.m2e.editor.xml.PomTemplateContext.getTemplates(PomTemplateContext.java:490)
	at org.eclipse.m2e.editor.xml.PomContentAssistProcessor.getTemplateProposals(PomContentAssistProcessor.java:414)
	at org.eclipse.m2e.editor.xml.PomContentAssistProcessor.addProposals(PomContentAssistProcessor.java:360)
	at org.eclipse.m2e.editor.xml.PomContentAssistProcessor.addProposals(PomContentAssistProcessor.java:134)
	at org.eclipse.m2e.editor.xml.PomContentAssistProcessor.addTagInsertionProposals(PomContentAssistProcessor.java:108)
	at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.computeEndTagOpenProposals(AbstractContentAssistProcessor.java:1496)
	at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.computeCompletionProposals(AbstractContentAssistProcessor.java:1314)
	at org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistProcessor.computeCompletionProposals(XMLContentAssistProcessor.java:109)


Reproducible: Always

Steps to Reproduce:
1. open a maven project
2. open the pom in xml mode in the pom editor
3. add a dependency.
4. in the dependency add a group id element
5. inside the goupid element type *or
6. press ctrl+space (for auto completion

Notice the UI hangs here.
After approx 3 minutes you see a dialog
   "Unhandled event loop exception
   Java heap space"

Then there is a message about momory error and you are recommended to restart eclipse.

If wildcards are supported it shouldn't crash.
If they are not supported it should return zero results (i don't see anything in central with a groupid starting with *or
Comment 1 Milos Kleint CLA 2011-06-28 08:46:54 EDT
all ui text field proposals now have the queries escaped.
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=3a5016532d2272ed34ba5cc297ed508177f6d170

still when entering the "*or" text into search field, the same OOME appears. According to cstamas, the latest version of apache indexer code (4.1.1) will reject queries starting with a wildcard. The current version used by m2e is 3.1.0.

I've filed a separate issue 350568 for teh upgrade of apache maven indexer.
Comment 2 Igor Fedorenko CLA 2011-08-01 04:31:32 EDT
Closing as per last comment.
Comment 3 Denis Roy CLA 2021-04-19 13:22:58 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/