Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328369

Summary: Unexpected runtime error while computing a text hover
Product: [Tools] CDT Reporter: Yevgeny Shifrin <yevshif>
Component: cdt-editorAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0   
Target Milestone: 7.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Yevgeny Shifrin CLA 2010-10-21 11:11:23 EDT
Build Identifier: 20100617-1415

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:694)
at org.eclipse.cdt.internal.ui.text.c.hover.CSourceHover.getHoverInfo(CSourceHover.java:617)
at org.eclipse.cdt.internal.ui.text.c.hover.AbstractCEditorTextHover.getHoverInfo2(AbstractCEditorTextHover.java:83)
at org.eclipse.cdt.internal.ui.text.c.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:149)
at org.eclipse.cdt.internal.ui.text.c.hover.CEditorTextHoverProxy.getHoverInfo2(CEditorTextHoverProxy.java:86)
at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)

Reproducible: Couldn't Reproduce

Steps to Reproduce:
I am not sure what causes this error. I've seen it in the log file.
Comment 1 Anton Leherbauer CLA 2010-10-22 02:36:02 EDT
I'll add a guard against that.
Comment 2 Anton Leherbauer CLA 2010-10-22 04:10:20 EDT
Fixed in HEAD and cdt_7_0 (7.0.2).