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

Bug 364943

Summary: java.lang.StringIndexOutOfBoundsException exception observed
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: 8.0.1   
Target Milestone: 8.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Yevgeny Shifrin CLA 2011-11-28 07:52:22 EST
Build Identifier: 20110916-0149

Eclipse IDE for C/C++ Linux Developers

Version: Indigo Service Release 1
Build id: 20110916-0149

Unexpected runtime error while computing a text hover

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:636)
	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
Comment 1 Anton Leherbauer CLA 2011-11-28 10:26:25 EST
Similar to bug 328369. There is another chance to run into the same exception.
Comment 2 Anton Leherbauer CLA 2011-11-28 10:40:28 EST
Fixed in cdt_8_0 and master.
Comment 3 CDT Genie CLA 2011-11-28 11:23:04 EST
*** cdt git genie on behalf of Anton Leherbauer ***

    Bug 364943 - java.lang.StringIndexOutOfBoundsException exception observed

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ca652923840623cd57fa31799595020060d2add3
Comment 4 CDT Genie CLA 2011-11-28 11:23:07 EST
*** cdt git genie on behalf of Anton Leherbauer ***

    Bug 364943 - java.lang.StringIndexOutOfBoundsException exception observed

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=fc0097f13173d9961bc26c545fee74607528ee96