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

Bug 327505

Summary: Templates not working
Product: [Tools] Linux Tools Reporter: Cloud <Wyrmian11>
Component: LibhoverAssignee: Jeff Johnston <jjohnstn>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cdtdoug
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
consolelog from error none

Description Cloud CLA 2010-10-12 02:02:02 EDT
Build Identifier: M20100909-0800

When i use the normal strg + space shortcut for templates during c / c++ sessions
i get a long freeze and sometimes the message:
org.eclipse.cdt.mylyn.ui.helpcompletionproposalcomputer ... did not complete normally




Reproducible: Always

Steps to Reproduce:
1. write for then press strg + space
2. write do then press strg + space
3. any templates
Comment 1 Markus Schorn CLA 2010-10-12 09:33:10 EDT
Please provide the following:
* A code snippet with which you can reproduce the issue. 
* A thread dump.
See http://wiki.eclipse.org/How_to_report_a_deadlock for details on how to create a thread dump.
Comment 2 Cloud CLA 2010-10-15 02:48:11 EDT
Created attachment 180927 [details]
consolelog from error
Comment 3 Cloud CLA 2010-10-15 02:49:25 EDT
void main (void)
{
for

}
Comment 4 Jeff Johnston CLA 2010-10-18 14:10:22 EDT
(In reply to comment #2)
> Created an attachment (id=180927) [details]
> consolelog from error

The libhover plugins for glibc and libstdc++ access the hover data from an external web-site.  This is due to licensing restrictions from Eclipse.org and negotiations are under way to approve the documentation licenses so the data can be shipped with the plugins rather than have to use remote URLs to access.

If you have no web-access or it is slow or blocked somehow, then for a work-around, I suggest you either uninstall or disable the libhover docs for the time-being.  You can disable them per project by going to Project->Properties->C/C++ General->Documentation and unselecting the libstdc++ and glibc help books.
Comment 5 Cloud CLA 2010-10-22 02:13:49 EDT
Yes i am behind a proxy which blocks internet connection for eclipse.

i disabled the libs in c / c++ general -> documentation but the problem still remains.
Comment 6 Jeff Johnston CLA 2010-10-22 15:11:42 EDT
(In reply to comment #5)
> Yes i am behind a proxy which blocks internet connection for eclipse.
> 
> i disabled the libs in c / c++ general -> documentation but the problem still
> remains.

Though not tested under Windows, I don't know how this problem still occurs for you after unchecking the documentation boxes.  The following is the libhover code for getting a matching function that you are seeing in your traceback:

	public IFunctionSummary[] getMatchingFunctions(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String prefix) {
		ArrayList<IFunctionSummary> fList = new ArrayList<IFunctionSummary>();

		for (int di = 0; di < helpBooks.length; ++di) {

Note that libhover iterates over a set of helpbooks passed to it.  Those helpbooks correspond one for one with the checkboxes under C/C++ -> Documentation and are the helpbooks libhover reports at initialization time based on the libhover plugins you have installed (i.e. glibc, newlib,  libstdc++).  

I debugged libhover on Linux for a C++ project and after unchecking all boxes, I confirmed that the CDT doesn't call this function (there are no helpbooks enabled that belong to this CHelp provider).  So why the libhover function still shows up in your latest traceback is a mystery.

I have recently applied a quick patch to the sources to not do the stack trace in the case of a Connect error.  This would be available in a nightly build update.

If you were on Fedora, you could download an rpm with the documentation inside so internet access would not be required, but in light that you don't have internet access and cannot install the rpms, I would suggest you uninstall the libhover plugins to get around this issue.  Without internet access, the plugins can only offer help docs.
Comment 7 Cloud CLA 2010-10-26 02:00:03 EDT
Ok i will uninstall those and try again.

The funny thing however is, when i work under "Eclipse galileo" (that also have no internet access) the templates work fine. It´s only in the helios release that makes the problem.
Comment 8 Alexander Kurtakov CLA 2012-04-11 17:47:00 EDT
Can we close this one now ? Can someone still reproduce it?
Comment 9 Jeff Johnston CLA 2012-08-20 15:03:24 EDT
The latest version of the libhover plug-in now ships the glibc hover with the plug-in.  The C++ libhover is not shipped with Eclipse.  Closing.